Public Sub delay(ByVal TimeLast)
Dim Start As Integer = Environment.TickCount()
'Dim TimeLast As Integer = 7000 ' 要延遲 t 秒,就設為 t *1000
Do
If Environment.TickCount() - Start > TimeLast Then Exit Do
Application.DoEvents() ' 要記得寫這行,不然都在跑迴圈,畫面可能會不見
Loop
End Sub
沒有留言:
張貼留言