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
 

Initializing and blocking on .NET forms

There is a general pattern that applications follow to create and manage a .NET form.
To create and manage a .NET form:
1. Instantiate the form and its controls using the NEW function (classes).
2. Initialize the form, together with its controls and any additional control containers.
3. Subscribe handlers to appropriate .NET events, depending on your form and application.
4. Execute a .NET WAIT-FOR statement, which calls an appropriate .NET input-blocking method for the form.
5. After the form closes and the WAIT-FOR statement returns, do any post-form-closing tasks, such as resource clean-up, that your application might require.
Note: For multiple non-modal .NET forms, steps 1 through 3 can occur after step 4, in other words, in an event handler or trigger within the context of a single .NET WAIT-FOR statement.
For a given form, you can encapsulate most of these steps in a user-defined ABL form class that extends Progress.Windows.Form. For simplicity, this section primarily describes how to prepare and use the .NET WAIT-FOR statement for blocking on different types of .NET forms created directly from the Progress.Windows.Form class. For information on defining and using ABL-derived form classes to implement the basic types of .NET forms (non-modal, modal standalone, and non-modal MDI), see Creating custom .NET forms and controls. The basic principles for working with pure .NET form objects and ABL-derived .NET form objects are essentially the same.
* Preparing to block on .NET forms
* Blocking on and processing events for .NET forms