Original Post
hey, hopefully theres some VB programmers out there to help me. basically i want to be able to put my program to sleep for a specified time in the background, but still have it be able to wake up and respond to events if need be(like quiting it, for example). i cant call the windows api''s version of sleep for that reason, but i found this on the web:
Public Sub Wait(WaitTime)
Dim StartTime As Double
StartTime = Timer
Do While Timer < StartTime + WaitTime
If Timer > 86395 Or Timer = 0 Then
Exit Do
End If
DoEvents
Loop
End Sub
this works perfectly, except that it takes up 99 percent of the cpu (even if everything can still respond thats just not acceptable). is there another way?
thanks,
justo