Puts the current process thread to sleep for the specified number of milliseconds.
Number of milliseconds to Sleep
llUseDoEvents if .T. this breaks the milliseconds into 100ms chunks in a loop and fires DOEVENTS along with the operation. This will keep the FoxPro UI active and allow FoxPro to fire events during the sleep operation.
Note that this will increase the actual sleep time somewhat (~5% depending on events fired in VFP) so adjust as needed.
WinApi_Sleep()for long periods - periods in access of a couple of seconds at most - as it will freeze the main FoxPro UI thread and causes FoxPro to freeze.
If you need to wait for a longer period of time use a loop in combination with
DOEVENTSto force the UI to refresh:
FOR lnX = 1 to 100 WinApi_Sleep(100) DOEVENTS ENDFOR
This provides waits while still keeping the FoxPro UI active in the background and lets FoxPro process events
See also:Class wwAPI
Comment or report problem with topic