I have a function that simply fills a progress bar.
private void FillProgressBar(ProgressBar bar, Color c, int percent)
{
int steps = 10;
bar.set_Value(0);
for (int i = 0; i < percent / steps; i++)
{
System.Threading.Thread.Sleep(100);
bar.set_Value((i+1)*10) + bar.get_Value());
this.Refresh();
}
}
I summon it from the gui thread (not multi threading) and it’s purpose is to slowly fill the bar.
But it doesn’t seem to be doing it, although the value does raise.
Any suggestions on how to update a specific control or the whole form?
PS : as you can see, this.Refresh() didn’t work either.
try using
After updating the progress bar.
more on
DoEventshere