newtoc#484467

I have the timer properties as enabled = true, when I load the form I set it to enabled = false, later on in the form the timer is enabled = true but it never works. I have tried timer.Start but it never hits the timer_Tick event. I want the timer_Tick event to work when I am running another method Is that possible

Any one got a clue why the timer isn't working


Re: Windows Forms General Timer problem

TilakGopi

Hi,

I tried it.It's working fine.check the interval once.

Be sure that timer1.Start() is called after timer1.enabled = true(obviously,u've to).

Thanx,

Ch.T.Gopi Kumar.






Re: Windows Forms General Timer problem

Bob zhu - MSFT

you can try follow code , if still some proble please post some code here

private void button2_Click(object sender, EventArgs e)

{

this.timer1.Enabled = true;

this.timer1.Interval = 1000;

this.timer1.Tick += new EventHandler(timer1_Tick);

}

void timer1_Tick(object sender, EventArgs e)

{

this.label1.Text = DateTime.Now.ToString();

}