helpful sleep API call to suspend actions

By | 2002-06-01

What this API call does is suspend ALL actions for a certain amount of milliseconds(1000 milliseconds=1 second)(duh…)

Original Author: Derek Haas

Assumptions

Just dont enter a number that is huge, or else you will be waiting for a very long time

Side Effects

Dont enter a super large number.

API Declarations

Public Declare Sub Sleep Lib “kernel32” (ByVal dwMilliseconds As Long)

Code

Private Sub Form_Load()
Call Sleep(1000)
End Sub
'This code example will "sleep" for 1 second, and then load the form.

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.