Wait on a main or MDI form
- Last Updated: May 30, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Many GUI applications have a single, main form for the
application. When the application starts, the form is displayed
and when the form is closed, the application terminates. When the
application waits on a main or MDI form, the ABL WAIT-FOR statement
must specify Application:Run( ) with the
main form passed in as a parameter. This starts a .NET message
loop which is used to capture events and run ABL event handlers.
This is an example of the WAIT-FOR statement
for an application that has a single, main form:
|
When the main form FormObjectRef is specified in
the WAIT-FOR statement, the form is displayed when the
message loop is started.
Closing the main form terminates the WAIT-FOR. This
continues execution in the current block in your program immediately after
the WAIT-FOR. The application can close the main form
by calling the Close( ) method on FormObjectRef.