My requirement is to let's say lanch a form each 10 seconds so I figured I would use a timer. However, whenever a form is launched by the OnTimer function (which is called whenever the timer resets, it's like the loading of the form never completes and the program is in an unresponsive state. Note that the code below is not my real world scenario, but I get the same behavior.
Any suggestions or alternatives?
public void start()
System.Timers.Timer pollTimer = new System.Timers.Timer();
pollTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimer);
pollTimer.Enabled = true;
pollTimer.Interval = 10000;
public void OnTimer(Object source, System.Timers.ElapsedEventArgs e)
Form1 frm = new Form1();