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.Stop

Stops the timer.

[Visual Basic]
Public Sub Stop()
[C#]
public void Stop();
[C++]
public: void Stop();
[JScript]
public function Stop();

Remarks

Calling this method is identical to assigning a value of false to the Enabled property.

Example [Visual Basic]

The following example create a simple timer, and sets the interval to 3 seconds. The example then starts the timer and lets it run for 10 iterations.

[Visual Basic]

Private Sub MyTimer()
   '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 and run it for 10 iterations.
   Dim counter As Integer
   myTimer.Start()
   TextBox1.Text = "Iternation: "
   For counter = 1 to 10
      myTimer.Stop()
      TextBox1.Text & = counter.ToString & ", "
      myTimer.Start()
   Next
End Sub

See Also

Timer Class | Timer Members | System.WinForms Namespace