<-- Previous || Up || Next -->

Do Events Safe Sub
Basic Extensions Class

Public Sub DoEventsSafe()

Pause for a short period of time, but do NOT call the DoEvents function because Microsoft strongly recommends against using DoEvents within In-process OLE Servers (such as Entisoft Tools).

This function pauses for 10 milliseconds (.01 seconds) but does NOT call the DoEvents statement.
Example:
    Dim lngTry As Long
    For lngTry = 1 To 10000000
        Dim dblResult As Double
        dblResult = Sqr(lngTry)
        ' ... Other heavy-duty processing here.
        DoEventsSafe
    Next lngTry
See also:
    DoEvents Statement (Visual Basic)
    ReadMe Topic (Visual Basic 4.0)
    Sleep Function (WIndows KERNEL32 API)
v1.3 Change: Removed 16-bit support from this function.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.