DIGIT-ARC read-only archive · snapshot: July 23, 2026

C# regarding progress bar

2 posts · originally from https://geek.digit.in/community/threads/c-regarding-progress-bar.108992/

Pragadheesh
Pragadheesh Original post #1
Feb 19, 2009 at 6:55 PM
hi,
Code:
private void mnuTestGen_Click(object sender, System.EventArgs e) // by pragadheesh
          {
              Test();
              btnTestGen_Click(sender, e);
          }

in the above code,the methods Test() and btnTestGen_Click() takes time, so i want to add a progress bar as long as those two methods are processing.
how can i do it.?
dheeraj_kumar
Feb 19, 2009 at 8:02 PM
You should add progressbar support to Test() and the button click event, not this function.

first create a progressbar, then set the max and min like:

progressbar.maximum = 100
progressbar.minimum = 0

and progressbar.step = 1

self explanatory i think... you set the min and max limits of the bar, and step is the no of steps.

thats for configuring the bar. for modifying the bar, you use the progressbar.value during your function.

like progressbar.value += 1