Try OpenEdge Now
skip to main content
GUI for .NET Programming
Creating and Using Forms and Controls : ABL support for managing .NET forms and controls : Initializing and blocking on .NET forms : Blocking on and processing events for .NET forms
 
Blocking on and processing events for .NET forms
ABL supports the following general .NET WAIT-FOR statement syntax to block for input on .NET forms (see also the .NET WAIT-FOR statement syntax in OpenEdge Development: ABL Reference):

Syntax

WAIT-FOR dotNET-input-blocking-method-call .
For all non-modal .NET forms (and all non-modal ABL windows and other features that generate events, such as sockets), you use a single instance of this statement that calls the static System.Windows.Forms.Application:Run( ) method. This statement blocks on one or more forms and processes all their events, as well as events for all non-modal ABL components. The difference between this .NET WAIT-FOR statement and a WAIT-FOR statement that processes only ABL events is that the .NET WAIT-FOR statement unblocks and terminates execution after the Application:Run( ) method returns. This method termination automatically closes all instantiated .NET forms. However, the ABL-only WAIT-FOR statement for ABL events terminates only when a specified ABL event is raised, and you must manually close all non-modal ABL windows that you associate with this statement (see the reference entry for the ABL-only WAIT-FOR statement in OpenEdge Development: ABL Reference).
Note: You can also use the PROCESS EVENTS statement in an event handler or trigger to process all pending .NET and ABL events.
For each modal form, you use a single instance of the .NET WAIT-FOR statement that calls the ShowDialog( ) method on the associated form object. This statement displays the form as a dialog box and processes events only for that form until the form is closed, much like the ABL-only WAIT-FOR statement that displays and processes events for an ABL dialog box.
For more information on using the non-modal .NET WAIT-FOR statement, see Blockingon non-modal forms. For more information on using the modal .NET WAIT-FOR statement, see Blockingon modal dialog boxes.