Public Class Form1
Dim i As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
i = i + 1
TextBox1.Text = i
TextBox1.ForeColor = Color.Red
If i = 100 Then
Timer1.Enabled = False
MsgBox("Counting Finished ")
Application.Exit()
End If
End Sub
Private Sub btncount_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncount.Click
Timer1.Enabled = True
Timer1.Interval = "200"
End Sub
End Class