DOEVENTS Command
| Visual FoxPro 9.0 SP2 |
| DOEVENTS Command |
| See Also |
|
Executes all pending Windows events.
Note |
|---|
|
You cannot call DOEVENTS using parentheses (()), for example, "DOEVENTS( )". |
You can use DOEVENTS for simple tasks such as making it possible for the user to cancel a process after it starts, for example, searching for a file. Long-running processes that yield control of the processor are better performed using a Timer control or delegating the task to a COM Server executable (.exe). In this situation, the task can continue independently of your application, and the operating system takes care of multitasking and time allocation.
Caution |
|---|
|
Any time you temporarily yield control of the processor in an event procedure, make sure the procedure is not run again from a different part of code before the first call ends. Doing so might cause unpredictable results. In addition, do not use DOEVENTS if other applications might interact with your procedure in unforeseen ways during the time you have yielded control of the processor. |
DOEVENTS [FORCE] |
Parameters
- FORCE
-
Pauses Visual FoxPro code execution until a Windows event occurs, such as moving the mouse.
Note Using the FORCE keyword can impact performance. Therefore, use caution when calling
DOEVENTS FORCEin a tight code loop, such as a DO WHILE loop.
Remarks
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Caution
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08