Block on and process events for .NET forms
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Syntax
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 ABL Reference):
|
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 ABL Reference).
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 Block on non-modal forms. For more information on using the modal .NET WAIT-FOR statement,
see Block on modal dialog boxes.
END-ERROR in ABL are
ignored. The same applies to APPLY END-ERROR. If you want to close a .NET
window or dialog programmatically, call the proper method on the form or dialog.