I would like to use a BackgroundWorker. Because we have a loop that large in your WinForm it will block and your app will look like it has hanged.Now we are using BackgroundWorker.ReportProgress()to see how to report progress back to the UI thread and progress bar has been changed.
Anupam Mishra
20-Jan-2016I would like to use a BackgroundWorker. Because we have a loop that large in your WinForm it will block and your app will look like it has hanged.Now we are using BackgroundWorker.ReportProgress()to see how to report progress back to the UI thread and progress bar has been changed.
Output:
you can also set the property of Progress bar, such like this:
progressbar1.Minimum=0;
progressbar1.Minimum=100; etc.