PUBLIC Form ( )System.Windows.Forms.Form class (from the .NET Framework)
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:
DEFINE VARIABLE DisplayFormDemo AS CLASS DemoForm.DisplayFormDemo = NEW DemoForm( ).DisplayFormDemo:Wait( ).For more examples, see the chapter on creating and using forms and controls in OpenEdge Development: GUI for .NET Programming.
![]()
The form is displayed using the .NET ShowDialog( ) method invoked from a WAIT-FOR statement.
![]()
The form is displayed using either the .NET Show( ) method or the Application:Run( ) method invoked from a WAIT-FOR statement.
![]()
The form is displayed using the .NET Application:Run( ) method invoked from a WAIT-FOR statement.
Note: To associate a child form with a parent form, use the Progress.Windows.Form class to create a child form and set the child’s .NET MDIParent property to the parent form.
![]()
When a parent form is closed, the Closing events of all child forms are raised before the parent form's Closing event 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:
Note: Unlike in a .NET application, invoking the ShowDialog( ) 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 the System.Windows.Forms.Form class, 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:
![]()
Prepares the specified form by invoking its .NET Show( ) methodThis statement will also display any additional non-modal forms that you have previously prepared by setting their Visible property to TRUE and invoking their .NET Show( ) 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 Visible property to TRUE and invoking their .NET Show( ) method. In this case, all non-modal forms currently displayed can be closed and execution can resume only after the application invokes the Application:Exit( ) method.
Note: Unlike in a .NET application, invoking the Show( ) 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( ) and Application:Run( ) methods inherited from the System.Windows.Forms.Form class, refer to the .NET Framework class library.
![]()
![]()
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 OpenEdge Development: GUI for .NET Programming.
![]()
For information on the public class members inherited from the System.Windows.Forms.Form class, refer to the .NET Framework class library.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |