Try OpenEdge Now
skip to main content
GUI for .NET Primer
Basic Types of Forms and Application Design : Using the WAIT-FOR statement
 

Using the WAIT-FOR statement

For an application that uses non-modal .NET forms, whether or not it also uses ABL windows, you must use a .NET event loop controlled by a single WAIT-FOR statement.
ABL supports a version of the WAIT-FOR statement that instructs the AVM to stop executing the current block and remain in a wait state until a .NET method that it calls returns. The AVM continues to respond to all incoming ABL events as well as .NET events, and it executes any associated triggers, event procedures, or .NET event handlers while in this wait state. To accommodate the different .NET form types, the WAIT-FOR statement supports multiple syntax versions. If your application uses non-modal .NET forms, including MDI forms, this .NET-oriented WAIT-FOR statement must be the first, non-modal WAIT-FOR of any kind in your application.
* Waiting on a main or MDI form
* Waiting on multiple, non-modal forms
* Modal dialogs