Vb net progress bar not updating

26 Feb

WPF comes with a handy control for displaying progress, called the Progress Bar.

Next we reset the values for our listbox and and progressbar. All it’s doing is looping 100 times and reporting the progress and sleeping 100ms between iterations. You can also see that in the Report Progress function call that we’re passing in the current value and a string.

Here's a very basic example to demonstrate it with: In this case, I've used a pretty standard approach of showing progress as a percentage (between 0 and 100%), giving it an initial value of 75.

Another approach is to use actual minimum and maximum values from a list of tasks you're performing.

NET Framework 2.0 Background Worker class makes it easy to code simple threading into your applications.

However, a common question that gets asked in VB related forums is, “How do I update a control, or controls, from the worker thread? Many people seem to be in search of a simple explanation of how to do this.