Re: Simple question by Auric__
Auric__
Thu May 27 07:05:13 CDT 2004
On Thu, 27 May 2004 13:33:02 +0200, PE wrote:
>Hi
>I want to add a wait/delay wihtin a loop for 30 sec,
>i know how you do this in windows scripting with wscript.sleep but how do
>you do in VB6 ??
(OT in this group, BTW.)
Recommended method:
[declarations section:]
Declare Sub Sleep Lib "kernel32" Alias "Sleep" _
(ByVal dwMilliseconds As Long)
[in your code:]
Sleep 30000
You could do it without an API call, by, say, checking the clock and
looping:
x = Timer + 30
Do Until Timer >= x
DoEvents
Loop
...but this can affect performance.
--
auric underscore underscore at hotmail dot com
*****
Solve the problems of the world: Vote anarchist.