Initializes a new instance of the Timer class.
Initializes a new instance of the Timer class.
[Visual Basic] Overloads Public Sub New()
[C#] public Timer();
[C++] public: Timer();
[JScript] public function Timer();
Initializes a new instance of the Timer class with the specified container.
[Visual Basic] Overloads Public Sub New(IContainer)
[C#] public Timer(IContainer);
[C++] public: Timer(IContainer*);
[JScript] public function Timer(IContainer);
The following example create a simple timer, sets the interval to 3 seconds, and starts it.
Note This example shows how to use one of the overloaded version of the Timer constructor. For other examples that may be available, see the individual overload topics.
[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()