AutoYield Property

Applies To   See Also

Specifies whether an instance of Visual FoxPro processes pending Windows events between execution of each line of user program code.

Syntax

ApplicationObject.AutoYield[ = lExpr]

Settings

lExpr

Specifies whether an instance of Visual FoxPro processes Windows events between each line of user program code. lExpr can be one of the following logical values:

lExpr Description
True (.T.) (Default) The instance of Visual FoxPro processes pending Windows events between execution of each line of user program code.

If lExpr is set to true (.T.), the instance of Visual FoxPro processes pending Windows events in the same manner as earlier versions of Visual FoxPro.

False (.F.) The instance of Visual FoxPro does not process pending Windows events between each line of user program code.

All pending Windows events are placed in a queue, and the events in the queue are processed when DOEVENTS is issued or a wait state occurs. A wait state occurs when Visual FoxPro is waiting for input from the user. The WAIT command does not create a wait state.


Remarks

The AutoYield property should be set to false (.F.) when a form contains an ActiveX control. Setting AutoYield to false (.F.) prevents events for an ActiveX control from executing between lines of user program code. For example, if AutoYield is set to true (.T.), clicking an ActiveX control while user program code is executing may cause an event for the ActiveX control to execute, ignoring the user program code for the event, producing undesirable or unpredictable results.

The following occurs when the AutoYield property is set to false (.F.):