I’ve run into some problems while using progress bars in Windows Forms. Say I have an algorithm with ten parts that runs on a button click. After each part, I’d want to update a progress bar on the form to 10% further along. However, when code is running, the Windows Form will not respond or update.
What is the correct do show progress on a form while code is running?
You need to use a
BackgroundWorker.A nice example can be found here: http://www.dotnetperls.com/progressbar
Or you can use something like: