I know there is Thread.Sleep and System.Windows.Forms.Timer
and Monitor.Wait in C# and Windows Forms. I just can\'t seem to be able to figure out how to wait fo
@eFloh in the post marked as answer said:
The Tick event may be executed on another thread that cannot modify your gui, you can catch this ...
That is not what the docs say.
You are using a System.Windows.Forms.Timer in your example code.
That is a Forms.Timer.
According to the C# docs the Timer events are raised on the UI thread.
This Windows timer is designed for a single-threaded environment where UI threads are used to perform processing. It requires that the user code have a UI message pump available and always operate from the same thread ...
Also see stackoverflow post here