Implements a timer that raises an event at user-defined intervals. This timer is optimized for use in Windows Forms applications and must be used in a window.
See Also: Timer Members
A System.Windows.Forms.Timer is used to raise an event at user-defined intervals. 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, or marshal the call onto another thread.
When you use this timer, use the Timer.Tick event to perform a polling operation or to display a splash screen for a specified period of time. Whenever the Timer.Enabled property is set to true and the Timer.Interval property is greater than zero, the Timer.Tick event is raised at intervals based on the Timer.Interval property setting.
This class provides methods to set the interval, and to start and stop the timer.