Sleep




Public Declare Sub Sleep Lib "kernel32" _
Alias "Sleep" (ByVal dwMilliseconds As Long)
'DoEvents does this:

'While (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {

' TranslateMessage(&msg);

' DispatchMessage(&msg);

' }

'DoEvents spends part of its time watching For other

'messages in the same process. This behavior has no

'value in a preemptive-multitasking operating system.

'Sleep yields more efficiently to other processes.

'and can be called as:

Sleep 0&










( sleep.html )- by Paolo Puglisi - Modifica del 17/12/2023