D
dawn
Hi,
I'm testing my app, and it does something very strange (at least i think so).
I have a button on my form and when I click it it triggers an event.
the method is structured like this
private void button3_click ( , )
{
if (timer1.Enabled)
{
timer1.Stop();
timer1.Enabled = false;
}
int count = 0
if (count < 5)
{
count++;
for ()
{
for()
{
//do a few things
}
}
timer1.Start();
timer1.Enabled = true;
}
else
{
//do some other things
}
}
Now when i test run the app......
count sometimes goes up to 5 (sometimes 4, other times 2).....without the code in Timer1_Tick ever being accessed, so it looks like button_3_click is executed more than once when the button is clicked. Nothing else in my code references to this method.
Why could it be doing this???
Any help will be greatly appreciated
I'm testing my app, and it does something very strange (at least i think so).
I have a button on my form and when I click it it triggers an event.
the method is structured like this
private void button3_click ( , )
{
if (timer1.Enabled)
{
timer1.Stop();
timer1.Enabled = false;
}
int count = 0
if (count < 5)
{
count++;
for ()
{
for()
{
//do a few things
}
}
timer1.Start();
timer1.Enabled = true;
}
else
{
//do some other things
}
}
Now when i test run the app......
count sometimes goes up to 5 (sometimes 4, other times 2).....without the code in Timer1_Tick ever being accessed, so it looks like button_3_click is executed more than once when the button is clicked. Nothing else in my code references to this method.
Why could it be doing this???
Any help will be greatly appreciated