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 section 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
Using.NET Forms with ABL Windows