Delay, Pause, Wait or Sleep in VB

Use SetWaitableTimer: http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q231/2/98.asp&NoWebContent=1

Instead of lNumberOfSeconds As Long, I use lNumberOfSeconds As Double. So I can use 0.3 second (300 milliseconds).

Using Sleep: http://www.vbforums.com/showthread.php?t=357961

Using DoEvents and Timer: http://bytes.com/forum/post59842-8.html

Start another program using Shell and wait until it finishes: http://www.vb-helper.com/howto_shell_wait.html

How to pause and restart a thread : http://www.tek-tips.com/faqs.cfm?fid=6580

Follow

Get every new post delivered to your Inbox.

Join 65 other followers