I want to use progress bar in windows application. I know already, How to create progress bar but i don't know how to use when form is loading and take more time to load.
How yo use Progress bar in windows application by using c#.net
Collapse
X
-
Are you trying to run some code in the background so it does not interrupt your user interface when it is loading? If so its best to run that code asynchronously, or on another thread, and the easiest way to do that with basic code would be to add a background worker.
After adding a background worker, you'd add the function that executes whatever code you are loading in the Backgroundworke r.RunWorkerAsyn c() method, and it will run the code on another thread so that it doesnt interrupt your UI. While that code is running you can turn on progress reporting for the background worker, and call the Backgroundworke r.Reportprogres s() function to report the current progress of the loading to your progress bar.
Here's a page that gives some more information on the background worker:
Comment