Library code snippets
Put your VB application into deep sleep
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
-
VB6 Runtime error 381 subsript out of range Error
by Uncle (2 replies)
-
passing and reading parameters from using Shell
by jigartoliya (0 replies)
-
Convert C++ code to VB6
by mawcot (4 replies)
-
listbox scrollbar
by Dennijr (10 replies)
-
Can you describe Above simple VB6 code?
by pramodmca09 (0 replies)
Related podcasts
-
Christian Beauclair
14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...
This thread is for discussions of Put your VB application into deep sleep.