Initializes a new instance of the Timer class.
[Visual Basic] Overloads Public Sub New() [C#] public Timer(); [C++] public: Timer(); [JScript] public function Timer();
The timer will be disposed when garbage collection occurs. Note that if the timer is enabled, it will not be subject to garbage collection.
The following example create a simple timer, sets the interval to 3 seconds, and starts it.
[Visual Basic]
'Create a timer. Shared myTimer As WinForms.Timer myTimer = New WinForms.Timer 'Set the timer interval to 3 seconds and start it. myTimer.Interval = 3000 'Start the timer myTimer.Start()
Timer Class | Timer Members | System.WinForms Namespace | Timer Constructor Overload List