vb.net System.Timers.Timer怎么用?

2024-12-03 03:56:54
推荐回答(2个)
回答(1):

Dim TimerMove As System.Timers.Timer
TimerMove = New System.Timers.Timer
With TimerMove
AddHandler TimerMove.Tick, AddressOf TimerMove_Tick
TimerMove.Interval = 1000
TimerMove.Start()
End With
Private Sub TimerMove_Tick(ByVal sender As Object, ByVal e As EventArgs)
Label2.Left = Label2.Left - 20
If Label2.Left = -200 Then
Label2.Left = 1000
End If
End Sub

回答(2):

http://blog.csdn.net/xiaocuner/archive/2009/01/16/3793557.aspx