vb.net System.Timers.Timer怎么用?
2个回答
展开全部
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
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
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询