Library code snippets
Put your VB application into deep sleep
By ElementK Journals, published on 14 Jul 2001
There may be occasions when you want an application to wait for a specified
period of time without performing activity or wait loops. The Timer control
can help, but only up to 60 seconds.
The Sleep Windows API function lets you put the application to sleep. Enter
the
following declaration into a standard module.Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Then, simply call the function from your code, as in:Sleep 5000
In this case, the 5000 milliseconds puts the application to bed for 5 seconds.
You can specify your own period of time, though.
Related articles
Related discussion
-
Run-time error '91'
by crazyidane (0 replies)
-
Problem handling Redirects with MSXML2.XMLHTTP
by brandoncampbell (2 replies)
-
vbinputbox pauses code while it waits on response. How can I reproduce that?
by brandoncampbell (1 replies)
-
Sending SMS in VB 6
by sirobnole (6 replies)
-
Comboxbox listindex in ActiveX Control
by brandoncampbell (1 replies)
This thread is for discussions of Put your VB application into deep sleep.