For a somewhat mysterious reason Visual Basic does not contain any Delay, Pause, or Sleep function. Fortunatelly it's easy to make in on our own:
'
'Wait for the specified amount of seconds
Public Sub SleepSec(ByVal sec As Integer)
Dim sta As Variant
sta = Timer 'start time
Do While Timer < sta + sec
DoEvents
Loop
End Sub
Note the DoEvents call - it's necessary here, else our loop will use full resources of pseudo-32bit Win95/98, causing the system to freeze!
------------------
Mirek Wojtowicz
wellCAM CCS Lublin, Poland
http://www.wellcam.pl
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP