
July 21st, 2003, 05:09 PM
|
|
Average Intelligence
|
|
Join Date: Apr 2003
Location: Ohio/Chicago
Posts: 678
Time spent in forums: 10 m 22 sec
Reputation Power: 6
|
|
the Sleep API function is your best bet as it pauses the execution within an event.
you can also do a busy wait which is not so hot, but if you don't have time to mess around and just want to get it out of the way. Here's the busy wait function to use if you're lazy
Add this code to a module:
Public Declare Function GetTickCount Lib "kernel32" () As Long
Public Function Pause(Value As Long) ‘ Value is the amount of time to pause
‘ for in milliseconds
Dim PreTick As Long
PreTick = GetTickCount
Do
DoEvents
If GetTickCount = PreTick + Value Then Exit Do
Loop
End Function
|