NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Timer Constructor

Initializes a new instance of the Timer class.

Overload List

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);

Example [Visual Basic]

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()

See Also

Timer Class | Timer Members | System.WinForms Namespace