Public Class Form1
Dim a As Integer
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
a += 1
TextBox1.Text = a
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
a = 0
TextBox1.Text = 0
Timer1.Start()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
End Class
定时器输出
最新推荐文章于 2024-07-21 23:10:47 发布