프로그래밍언어/VB.NET
쿨타임,시간지연,딜레이
부산딸랑이
2013. 2. 27. 06:30
Private Declare Function GetTickCount Lib "kernel32" () As Long
Sub Wait(ByVal cTime As Long)
Dim sTime As Long
sTime = GetTickCount + cTime
Do While sTime >= GetTickCount
Application.DoEvents()
Loop
End Sub
cTime 단위는 ms(밀리초, 1000분의 1초)임
Wait(밀리초)
System.Threading.Thread.Sleep(500)