I am working on Windows Forms application. I have a windows form in which a label is set visible to false by default. I want to set property visible to true for 10 seconds and then after to false. I have dragged the timer control and set the interval to 1000 miliseconds, that is, 1 second, and I have written the code in form load event:
timer1.Start();
if (timer1.Interval == 5000)
{
timer1.Stop();
}
But it is not setting the label visible to false. Why?
In which event do I have to fire this code so that when the timer starts and when will it be 5 seconds and then the label will be set to false? Is that possible in C#?
Check the below code.