ABL support for managing .NET forms and controls
- Last Updated: April 10, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
The general algorithm for creating and managing .NET forms is conceptually similar to creating and managing ABL windows. However, instead of creating widget objects and working with their handle attributes, methods, and events, you create .NET form and control objects and work with their object properties, methods, and events.
To block on all .NET non-modal forms in your application,
you use a single occurrence of the WAIT-FOR statement
(the .NET WAIT-FOR statement)
that calls the static .NET input-blocking method, System.Windows.Forms.Application:Run( ).
This single WAIT-FOR statement allows all non-modal .NET forms
and ABL windows to be displayed and processes events for all non-modal
ABL and .NET components in your application. However, to block on .NET modal
forms, you use a separate .NET WAIT-FOR statement
for each .NET modal form (dialog box), similar to displaying
an ABL modal dialog box. This version of the .NET WAIT-FOR statement
(for modal forms) calls a different input-blocking method (ShowDialog( ))
on a given instance of the modal form. As noted previously (see
the Limitations of support for .NET classes), you cannot call .NET input-blocking methods
directly in an ABL application. Instead, you must use the .NET variation
of the ABL WAIT-FOR statement to make these calls. This WAIT-FOR statement
then blocks until the .NET input-blocking method returns.
.NET already provides the System.Windows.Forms.Form class to create forms. However, if you use the OpenEdge
derived class (recommended), Progress.Windows.Form, to create all your .NET forms, ABL
maintains the resulting instances on a single session form chain that you can access using
SESSION system handle attributes. (This topic describes how to access .NET forms on the
session form chain.) You can then work with .NET forms and ABL windows in the same ABL session
in a consistent fashion. For example, you can parent .NET forms and ABL windows to each other,
creating window families that consist of both .NET forms and ABL windows. For more information
on using .NET forms and windows together, see Use .NET forms with ABL windows
Finally, .NET allows you to create an XML resource (.resx) file associated with a given ABL class that stores resource sets (such as
images) that some form controls use. To access this resource file from ABL, OpenEdge provides
a .NET utility class, Progress.Util.ResourceHelper. This topic describes how to use this
class.
The following sub-topics describe: