Does anyone know why my timer isn't working? Added a timer into my form. The interval is 1000.
private void button1_Click(object sender, EventArgs e)
{
label5.Visible = true;
timer2.Enabled = true;
timer2.Start();
}
private void timer2_Tick(object sender, EventArgs e)
{
if (timer2.Interval == 3000)
{
label5.Visible = false;
}
}
After 3 seconds the label is still visible, and the interval is still on 1000. What am I doing wrong?
1000
and in your Timer Elapsed event you are checking if Interval is3000
. Your condition will always be false – Habib