I am using the code below to update the progress bar.
ProgressBar.Visible = true;
ProgressBar.Minimum = 1;
ProgressBar.Maximum = PortCount;
ProgressBar.Value = 1;
ProgressBar.Step = 1;
int intdata = 5;
for (int x = 1; x <= intdata; x++)
{
ProgressBar.PerformStep();
}
MessageBox.Show("Done");
But it is not updated at runtime. This is because the progress bar is on the same thread. If so, how to update this progress from another thread. Help...
source
share