Windows API Guide: SetTimer Function


Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

Platforms: Win 32s, Win 95/98, Win NT

Sleep pauses program execution for a certain amount of time. This is more accurate than using a do-nothing loop, waiting for a certain amount of time to pass. The function does not return a value.

dwMilliseconds
The number of milliseconds to halt program execution for.

Example:

' Pause the program for 2 seconds, displaying the system ' time before and after the pause. Debug.Print "The time is "; Time$  ' display the current time Sleep 2000  ' 2000 milliseconds = 2 seconds to delay Debug.Print "The time is "; Time$  ' this time will be 2 seconds later

Category: Other

Go back to the alphabetical Function listing.
Go back to the Reference section index.


This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/s/sleep.html



Windows API Guide
Windows API Guide - Reference - Volume 1: Version 3.0 For the MS-DOS and PC-DOS Operating Systems
ISBN: B001V0KQIY
EAN: N/A
Year: 1998
Pages: 610

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net