I've run the timer in a htread and that did not help either.
Code:
public static System.Timers.Timer aTimer;
public void Form1_Load(object sender, EventArgs e)
{
Thread thread = new Thread(new ThreadStart(Timer));
}
public static void Timer()
{
// Create a timer with a three second interval.
aTimer = new System.Timers.Timer(3000);
// Hook up the Elapsed event for the timer.
aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
// Set the Interval to 2 seconds (2000 milliseconds).
aTimer.Interval = 2000;
aTimer.Enabled = true;
}
I'm not the best C# coder as I hardly use it, so be gentle lol.
Cheers