1. Create a Windows Application
2. Drag a ProgressBar Control
and set its Dock property to bottom and its Step property to 1
4. Drag a Timer Control to the form and set its Enabled property to true.
5. The form should look like this:
6. Double click the timer and add the following code:
Download the code: Using ProgressBar in C#
2. Drag a ProgressBar Control
and set its Dock property to bottom and its Step property to 1
4. Drag a Timer Control to the form and set its Enabled property to true.
5. The form should look like this:
6. Double click the timer and add the following code:
if (progressBar1.Value >= 100)7. Run the application. :D
{
timer1.Enabled = false;
return;
}
progressBar1.PerformStep();
Download the code: Using ProgressBar in C#
Comments