I have in my code a progressBar, which is filled in 60 seconds, how do I do that when I get in 60 seconds it starts counting again.
private void timer_progress_Tick(object sender, EventArgs e)
{
pro_separacao.Increment(1);
}
I have in my code a progressBar, which is filled in 60 seconds, how do I do that when I get in 60 seconds it starts counting again.
private void timer_progress_Tick(object sender, EventArgs e)
{
pro_separacao.Increment(1);
}
Declare an int variable outside the Timer.
Then in your timer do this, very simple:
private int segundos;
private void timer1_Tick(object sender, EventArgs e)
{
segundos++;
pro_separacao.Value = segundos;
if (segundos >= 60)
segundos = 0;
}