Try OpenEdge Now
skip to main content
GUI for .NET Primer
Basic Types of Forms and Application Design : Using the WAIT-FOR statement : Waiting on multiple, non-modal forms
 

Waiting on multiple, non-modal forms

Waiting on a GUI application with multiple, independent, non-modal forms is set up differently than waiting on a main form. In this case, no form is specified on the WAIT-FOR statement. None of the forms are automatically displayed, so the Show( ) method must be called explicitly to display a form. To display forms when the application is started the Show( ) method is called on each form prior to the WAIT-FOR statement. The actual display of any forms is delayed until the WAIT-FOR statement executes. For example:
Form1ObjectRef:Show( ).
Form2ObjectRef:Show( ).
WAIT-FOR Application:Run( ).
Calling the Close( ) method on all the forms does not end the WAIT-FOR. The application must end the WAIT-FOR by calling the Application:Exit( ) method.