How do I create a Timer?
For my project I have to create a Timer, which is counting down, but
Task.Delay();
System.Threating.Threat.Sleep();
is not working, because it stops the whole application and I need it to stay responsive, for my timer to visually decrease. The Timer seems to also not to work, because when I use the Example from Jignesh Thakker, then I get an error, that the namespace "Forms" is not present.
The Timer Code
System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
t.Interval = 15000; // specify interval time as you want
t.Tick += new EventHandler(timer_Tick);
t.Start();
void timer_Tick(object sender, EventArgs e)
{
//Call method
}