Stops the timer.
[Visual Basic] Public Sub Stop() [C#] public void Stop(); [C++] public: void Stop(); [JScript] public function Stop();
Calling this method is identical to assigning a value of false to the Enabled property.
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