VB.net Progress bar

  • Thread starter Thread starter yesb via .NET 247
  • Start date Start date
Y

yesb via .NET 247

Hi,
VB.NET
I 've a process takes minimum of 20 secs so i want to show progressbar in this meantime.
i kept a progress bar and started timer on button click ,but the progressbar starts echoing after process is completed...
plz help
 
* yesb via .NET 247 said:
VB.NET
I 've a process takes minimum of 20 secs so i want to show progressbar in this meantime.
i kept a progress bar and started timer on button click ,but the progressbar starts echoing after process is completed...

Maybe the "process" blocks the UI thread and prevents the progressbar
control from updating. You can put the process into a separate thread
(multithreading).

<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms06112002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms08162002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms01232003.asp>
 
To add to Herfried's reply, windows forms are not threadsafe, so you
shouldn't have a seperate thread updating your windows form. Instead you
should do thread switching by using Form.Invoke and a suitable delegate.

It's a dangerous multithreaded world out there son .. be safe.

- Sahil Malik
Independent Consultant
You can reach me thru my blog at -
http://www.dotnetjunkies.com/weblog/sahilmalik/



progressbar starts echoing after process is completed...
 
Back
Top