PDA

Click to See Complete Forum and Search --> : delay?


Mar 16th, 2001, 12:42 PM
Private Declare Function GetTickCount Lib "kernel32" () As Long

Private Sub FreezeApp(ByVal dwSeconds As Long)
dwSeconds = dwSeconds * 1000
Start = GetTickCount
Do While GetTickCount < Start + dwSeconds
Loop
End Sub


Usage:

FreezeApp Val(Text1)
Print "Done"

KrishnaSantosh
Mar 18th, 2001, 01:27 AM
I Think SleepEx Would Also Work. Anyway I'm Not Sure

parksie
Mar 18th, 2001, 03:39 AM
Both Sleep and SleepEx will work, however SleepEx can be "signalled" to return earlier than stated.

Mar 18th, 2001, 09:10 AM
We can also use VB's Timer function, thus eliminating the need for API.