Dim WithEvents w_timer As New Timer
Dim w_tick As Integer
Private Sub wait(ByVal second As Integer)
w_tick = 0
w_timer.Interval = second * 1000
w_timer.Enabled = True
Do Until w_tick >= 1
Application.DoEvents()
Loop
w_timer.Enabled = False
w_timer.Interval = 1
End Sub
Private Sub w_timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles w_timer.Tick
w_tick += 1
End Sub
沒有留言:
張貼留言