|
I want to place a Progress Bar on my form, but I don't know how long particular tasks will take.
I tried using a Timer Control, but that didn't work.
The only thing I'm doing is changing the Cursor to WaitCursor and back to the default.
Any ideas greatly appreciated.
Thank you.
Mike
|
|
|
|
|
MikeUPMC wrote: I want to place a Progress Bar on my form, but I don't know how long particular tasks will take.
Hmmm... difficult when you don't know the length of a piece of string!
Three possible approaches...
1. use a ProgressBar but dynamically change the increment value until you KNOW how much longer it will take, then intelligently divide the remaining bar length into equal intervals, or
2. use the "pseudo-ProgressBar" approach which increments up to (say) 90% and then waits until the process is finished and only then sets the bar to 100%, (this was used in the past by some disreputable installation programs), - not really recommended , or
3. use an animated GIF or cursor to indicate to the user that things are happening and not to be tempted to CtlAltDel!
The most important thing is to convey to the user that progress is being made and not to interrupt the program.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
Continuing Steve's words:
4-You may use other progressbars which only state that your program is working (like windows XP startup) which does not show a fixed point at any time, and just passes across and then starts from the beginning...
|
|
|
|
|
Do you have any example code?
I tried to Thread this process out but to no avail.
Here's is what I'm trying to do:
I want to display the progress bar when I load in data on my Form1_Load Event.
Currently, I'm displaying a progress bar, it progresses from 1 = 120000,
then I do the .Fill Method to load the data onto a form.
The progress bar has completed, but the data is still loading.
The cursor is still the wait cursor.
( I know this is not correct)
Mike
|
|
|
|
|
No, unfortunately I don't have any source code for the use of that pseudo-progressbar...
But I try to give you some idea on which might be helpful...
You can make a form, which displays Processing (and maybe a gif animation stating that the program
is doing something) and the hourglass icon. Then in your main form create a thread which shows the processingform
as a dialog (using ShowDialog method.)
Then in the Load function write:
myThread.Start
oleDataAdapter1.Fill(DataSet1)
myThread.Stop
I think this would be better than a progressbar in you main form.
|
|
|
|
|
I need help to make an application which can both send and receive netsends from LAN. It will be like winmessenger. I did the sending part already, thanks to the site, don't have any clue about how to proceed for receiving netsends in my application textbox.
|
|
|
|
|
|
the thread is still open.
the site shows code only for sending, it receives a copy of sent messages.
But it doesen't actually receive messages.
When somebody net sends me ishould get the net send within my application.
|
|
|
|
|
I haven't used it recently, but a few years ago I played with it in a small network environment. It intercepted Net Send messages just fine.
Have you actually tried it? Maybe the code has been changed...??? I think I have the old version in some backup files somewhere.
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
yes i have tried the code, it is not receiving net send within the application, just normal windows popups are coming.
Can you please send me those files if you have them.
|
|
|
|
|
I tried the old code...no luck.
I was on Win2000 at the time. No idea why it isn't working now...I'm on XP. Shouldn't matter though.
If you feel up to it, check out the sb_StartHook procedure, and the WndProc function. You will see code written that is intended to intercept the messages from the Messenger Service (and it worked fine for me a few years ago):
Private Sub sb_StartHook()<br />
'************************************************************************<br />
'The following code will start the hooking.<br />
'************************************************************************<br />
'Used for Hooking START<br />
uRegMsg = RegisterWindowMessage(ByVal "SHELLHOOK")<br />
Call RegisterShellHook(hwnd, RSH_REGISTER) ' Or RSH_REGISTER_TASKMAN Or RSH_REGISTER_PROGMAN)<br />
OldProc = GetWindowLong(hwnd, GWL_WNDPROC)<br />
SetWindowLong hwnd, GWL_WNDPROC, AddressOf WndProc<br />
End Sub
In WndProc you'll find:
<br />
If wMsg = uRegMsg Then<br />
Select Case wParam<br />
Case HSHELL_WINDOWCREATED<br />
If GetWndText(lParam) = "Messenger Service " Then<br />
<br />
ShowWindow lParam, SW_HIDE<br />
<br />
'Get Window Text.<br />
strData = String(1000, vbNullChar)<br />
<br />
'Get Child Window handle with type Static (Label).<br />
hWndChild = FindWindowEx(lParam, 0&, "Static", vbNullString)<br />
<br />
'Get the text of the Child Window (Label).<br />
retHwnd = GetWindowText(hWndChild, strData, intDataLength)<br />
<br />
'Destroy the wondow.<br />
'PostMessage lParam, WM_KEYDOWN, VK_RETURN, &H1&<br />
PostMessage lParam, WM_CLOSE, 0&, &H1&<br />
<br />
...etc...
Sorry it didn't work out. Maybe you can modify this code to work. I just don't have time right now.
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
Hello, I'm not new to programming. However, I am new to dragging/dropping and encryption. I am wanting to create a password manager for myself as I am getting tired of trying to remember all of my passwords. I think this would be a good oppurtunity to gain more knowledge. Any tutorials on encryption and drag/drop?
Thanks
|
|
|
|
|
Both of the topics are really easy to find by googling!
Why don't you try it first?
|
|
|
|
|
Hi,
I need to get an Application I did not write to Exit using it's popup menu in the systray. (This is part of a watchdog application I am writting.
I tryed the ShowWindow(hwnd, SW_SHOW) but that only brings up part of the app and the Menu bar is missing. So that I can't SendKeys to it.
I also noticed, using WinDowse, that the systray icons don't show individual handles or PrecessID.
So can anyone guide me in the right direction? a methode or function.
Thanks for any effort you may grant to my request,
ChabDesign
|
|
|
|
|
Need a web chat code, can anyone send me please I will be thankful to him/her
|
|
|
|
|
Its not going to happen im afraid. I doubt anyone is going to send you complete, working code for something like this.
This forum is for answering code-related queries. Maybe you could give it a try yourself and post some code when you have a problem.
|
|
|
|
|
I hope you find the following link useful.
LINK:http://www.codeproject.com/aspnet/AliAspNetChat.asp
-------
End Less Loop
|
|
|
|
|
I am a bit rusty with VB.Net and I reckon there is a straight forward solution for this.
I have 2 arrays that I want to join as 1
example
Array 1
1, Peter
2, Ann
3, Barry
Array 2
1, Smith
2, Brown
3, Green
Want Array 1 to be
1, Peter, Smith
2, Ann, Brown
3, Barry, Green
Any ideas?
|
|
|
|
|
Just itterate the first array and concatenate the string with the other.
for int i=0 to array1.Length
array1[i] = array1[i] + "," + array2[i];
next
assuming you first check that both arrays have the same number of elements, this will work fine.
|
|
|
|
|
I'm trying to access advanced file properties such as revision Number,Title,Comments etc.
I have already created the file object,i can see how you get at file attributes such as size etc but don't know how to get at the advanced properties
thanks
Steve
|
|
|
|
|
I read that most of these custom properties are stored as part of the file itself and are retrieved by the application that created the file e.g MSWord, anyone know if that is true?
|
|
|
|
|
Dear Friends,
I am developing one simple application in vb.Net. Can some one tell me how to insert a record in access table in VB.Net, How to make a standered connection same as in VB6 we are opening connection only once in a main module. and then simply we are using with the record set for e.g. RsSave.open Ssql,Conn.
Can please some one show me the sample code for the above mentioned vb6 code in VB.NET.
Your quick response will be highly appreciated.
Thanks
Murtuza Patel
|
|
|
|
|
you have a class has name,application (Gets the path for the executable file that started the application, not including the executable name.) and make your file databas in same folder, which has executable file
Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
"ocking Mode=1;Jet OLEDB:Database Password=;Data Source=" & application.startup & "\Northwind.mdb"&";Passwo" & _
"rd=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Micro" & _
"soft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Prop" & _
"erties=;Mode=Share Deny None;Jet OLEDB:New Database Password=;Jet OLEDB:Create S" & _
"ystem Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Comp" & _
"act Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False"
123
-- modified at 18:39 Thursday 30th March, 2006
|
|
|
|
|
In a base form, i set KeyPreview properties to "TRUE". I want to Raise Click event of inherited forms AcceptButton at . When user clicks to F1.
|
|
|
|
|
i solved
AcceptButton.PerformClick
|
|
|
|