When an application dialog contains an ActiveX control that is assigned an event procedure, the event handler sometimes triggers additional ActiveX events. This variable determines whether or not the event procedure will be nested.

Set this variable to 1 (on, true, yes) if you want the event procedure to be nested. (This is the default). When NESTED_AX_EVENTS is set to 1, the runtime allows events to trigger while it is processing other events. It is your responsibility to know when the event procedure is busy and reject events when this is the case, or to look for specific events and properly handle them. For example, consider this code:

* Do some stuff 

When NESTED-AX-EVENTS is set to 1, it is possible that when your code is inside the event, possibly executing the loop for the fifth time, a new event triggers, setting MY-LOOP back to 1. The perform loop could execute simultaneously in two threads on the same data, and the runtime could crash. When you do not have reentrant events, MY-LOOP can only become 1 one time. This is the case when NESTED-AX-EVENTS are set to 0.

Set NESTED_AX_EVENTs to 0 (off, false, no) if you do not want the event procedure to be nested. Be aware, however, that this option may cause you to lose certain events (typically events triggered by modifications made in the event procedure).

When NESTED_AX_EVENTS is set to 0, once a program has entered an ActiveX control's event procedure, new events are ignored. This prevents the runtime from executing the same code, at the same time. However, events that are imperative for the code execution may be refused.

Note: NESTED_AX_EVENTS applies only to the local runtime and has no effect in thin client scenarios.