I can’t stop this timer :
private void startTimer_Click(object sender, EventArgs e)
{
AppTimer.Enabled = true;
}
private void AppTimer_Tick(object sender, EventArgs e)
{
if (BarreProgression.Value < BarreProgression.Maximum)
{
...
BarreProgression.Value = BarreProgression.Value + 1;
}
else if (BarreProgression.Value == BarreProgression.Maximum)
{
MessageBox.Show("Finished");
//AppTimer.Stop();
AppTimer.Enabled = false;
}
}
I have an infinity number of message boxes!
Any ideas?
A MessageBox blocks the execution until the user closes it so first stop the timer then show the message or you will get spammed by windows: