Progress.Windows.Form class
- Last Updated: October 18, 2024
- 4 minute read
- OpenEdge
- Version 12.2
- Documentation
(Windows only; GUI for .NET only)
Lets you create the following types of .NET forms in an ABL session (that co-exist with traditional ABL windows and dialog boxes):
- A modal form, which is similar to an ABL modal dialog box.
- A non-modal form, which is similar to an ABL non-modal window.
- A non-modal Multiple-Document Interface (MDI) parent form, which is not supported by the traditional ABL GUI.
Serializable:
No
Constructors
|
Super Class
System.Windows.Forms.Form class (from the .NET Framework)
Interfaces
Public Properties
| DisposeDialogOnClose property | NextForm property | PrevForm property |
| ProWinHandle property |
Public Methods
This class does not contain methods (beyond those it inherits from its base class).
Public Events
This class does not contain events (beyond those it inherits from its base class).
Example
The following example shows a simple ABL class that inherits from
Progress.Windows.Form create a non-modal form with two buttons that looks
behaves like a dialog box, except that it is non-modal:
|
To instantiate DemoForm and display the non-modal form, you can run a
procedure that contains the following code:
|
For more examples, see the topics on creating and using forms and controls in Use .NET Classes in ABL Applications.
Notes
- A modal form, which is similar to an ABL dialog box, has the following characteristics:
- The form is displayed using the .NET
ShowDialog( )method invoked from a WAIT-FOR statement. - The form must be closed before you can access any other non-modal forms.
- The form does not appear in the system taskbar.
- The form typically has a dialog box border style.
- The form typically has one or more buttons to close the form (such as OK or Cancel).
- The form has no affordances in the title bar for minimizing or maximizing the form.
- The form cannot contain a menu bar.
- The form is displayed using the .NET
- A non-modal form, which is similar to an ABL window, has the following characteristics:
- The form is displayed using either the .NET
Show( )method or theApplication:Run( )method invoked from a WAIT-FOR statement. - The form does not prevent access to other forms.
- The form does appear in the system taskbar.
- The form typically has a window border style.
- The form has affordances in the title bar for minimizing, maximizing, and closing the form.
- The form typically contains a menu bar.
- The form is displayed using either the .NET
- A Multiple-Document Interface (MDI) parent form, which is the foundation for an MDI
application, has the following characteristics:
- The form is a non-modal container form.
- The form is displayed using the .NET
Application:Run( )method invoked from a WAIT-FOR statement. - The form does not prevent access to other forms.
- The form contains a main menu bar, toolbar, and status bar.
- The form has affordances in the title bar for minimizing, maximizing, and closing the form.
- The form does appear in the system taskbar.
- The form has one or more associated child forms that provide for user interaction
with the application. Child forms can be minimized, maximized, and resized within the
MDI container.Note: To associate a child form with a parent form, use the
Progress.Windows.Formclass to create a child form and set the child's .NETMDIParentproperty to the parent form. - The form contains a client area in which all child forms are displayed.
- When a parent form is closed, the
FormClosingevents of all child forms are raised before the parent form'sFormClosingevent is raised.
- To display a modal form, you must invoke the WAIT-FOR statement with the form's
input-blocking
ShowDialog( )method, which does the following:- Suspends execution of the current block.
- Prepares and displays the specified form in a wait (blocking) state until the .NET form is closed by either the user or the application.
Execution resumes after the specified form is closed.
Note: Unlike in a .NET application, invoking theShowDialog( )method in an ABL session does not, by itself, cause modal forms to display. Instead, you must invoke the WAIT-FOR statement to display these forms. For more information, see the WAIT-FOR statement (.NET objects) reference entry in this book.For information on the .NET
ShowDialog( )method inherited from theSystem.Windows.Forms.Formclass, refer to the .NET Framework class library. - To display a non-modal form, you must invoke the WAIT-FOR statement with the
input-blocking
Application:Run( )method, which does the following:- Suspends execution of the current block
- Prepares the specified form by invoking its .NET
Show( )method - Displays the specified form in a wait (blocking) state until the form is closed by either the user or the application
This statement will also display any additional non-modal forms that you have previously prepared by setting their
Visibleproperty to TRUE and invoking their .NETShow( )method. After the specified form is closed, any additional non-modal forms currently displayed are also closed and execution resumes.If you do not specify a form, the WAIT-FOR statement displays and blocks for input on any non-modal forms that have been previously prepared by setting their
Visibleproperty to TRUE and invoking their .NETShow( )method. In this case, all non-modal forms currently displayed can be closed and execution can resume only after the application invokes theApplication:Exit( )method.Note: Unlike in a .NET application, invoking theShow( )method in an ABL session does not, by itself, cause non-modal forms to display. Instead, you must invoke the WAIT-FOR statement to display these forms. For more information, see the WAIT-FOR statement (.NET objects) reference entry in this book.For information on the .NET
Show( )andApplication:Run( )methods inherited from theSystem.Windows.Forms.Formclass, refer to the .NET Framework class library. - To handle a .NET form event while the WAIT-FOR statement is blocking execution, you must write and subscribe an event handler to the specified event prior to invoking the WAIT-FOR statement. For more information on event handlers for .NET events, see the Class Events Reference.
- In most cases, it is best to create a delegate class that encapsulates the form definition and related methods. For information on using delegate classes for forms, see Use .NET Classes in ABL Applications.
- For information on the public class members inherited from the
System.Windows.Forms.Formclass, refer to the .NET Framework class library.
See also
Progress.Util.ResourceHelper class, WAIT-FOR statement (.NET and ABL)