Click here to Skip to main content
15,561,246 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,
I have been developing a project lately using VB.NET ... and some processes take time to finish and I want to display a progress dialog box or something to display a process is going on ...... and unfortunately I have no idea how to do it .... any one with ideas, comments, solutions I will be thankful ...

with best regards
Abel K.
Posted
Updated 11-Feb-10 5:36am
v2

If you want your UI to be responsive while the task runs, you will have to put it on a background thread. The easiest way to do this is to use a BackgroundWorker. This will also allow you to report progress and update a progress dialog.

[Added link]

This article is in C# but seems to do what you want:

Working with BackgroundWorker & Creating Your Own Loading Class[^]

Nick
 
Share this answer
 
v2
Hi,

For simple things BackgroundWorker component will do. But you've to be aware windows forms will not function well in a multi-threaded environment. Hence a direct update to UI (for e.g. updating a label, or textbox, etc) will result in an exception. You have to invoke functions which do the UI update, and while doing so invoke them on the thread which the form was created. The following two links should help you out:

http://msdn.microsoft.com/en-us/library/8xs8549b.aspx[^]
http://msdn.microsoft.com/en-us/library/ms951089.aspx[^]
 
Share this answer
 
It sounds like you're wanting a basic answer...not how to do multi-threading. It sounds like all you're asking how to do is show a ProgressBar. I could be wrong though. To do that, you add a StatusStrip to your form. Then, you can add a ToolStripStatusLabel or ToolStripStatusBar.

You can google those to find out how to use them.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900