1) Add a timer object to your project 2) Set Interval property (the interval is in miliseconds) 3) Create a Tick Event ( you can double-click the timer to create it) 4) Add a progress bar object ; set Minimum and Maximum property with the values you desire;
2 answers
First set your timer's Interval property to 10000 and its Enabled property to true.
Now handle the timer's Tick event as follows (if you double click on the timer in the VS designer it will open up the handler for you):
answered one year ago by:
17279
30
thank ^^
You could write something like this:
1) Add a timer object to your project
2) Set Interval property (the interval is in miliseconds)
3) Create a Tick Event ( you can double-click the timer to create it)
4) Add a progress bar object ; set Minimum and Maximum property with the values you desire;
private void myTimer_Tick(object sender, EventArgs e)
{
myTimer.Stop();
myProgressBar.Value += 1;
if(myProgressBar.Value == myProgressBar.Maximum)
myProgressBar.Value = myProgressBar.Minimum;
myTimer.Start();
}
answered one year ago by:
30
30
thank^^