1.System.Threading.Thread.CurrentThread.Sleep(1000)

2.Sub delay()
     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

arrow
arrow
    全站熱搜

    pcman 發表在 痞客邦 留言(0) 人氣()