DoEvents Method

Edits all messages waiting in the message queue. This is the equivalent of the Visual FoxPro command DOEVENTS.

Syntax

Server.DoEvents()

Remarks

If AFP is run as EXE there is no difference between Server.DoEvents() and the VFP command DOEVENTS. This command is not available in the multithreaded Visual FoxPro runtime library. Although it will not trigger an error, this command will be ignored.

Ordinarily you need not invoke this function. This rule does not apply to the utilization of COM servers that invoke a method in a VFP object. So long as an AFP page is executed in the MTDLL version of AFP, invocations of COM will not execute. Rather, they will be collected and run after execution of the page. If you are waiting for a successful completion message from a COM server run in an asynchronous thread, you need to run Server.DoEvents() on a regular basis.

All AFP objects, with the exception of pure data objects, have this method.