OpenEdge GUI dialog compared to OpenEdge GUI for .NET dialog
- Last Updated: January 16, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
The OpenEdge GUI provides two types of dialogs,
a modal dialog box that you can display using a frame widget and
a modal message box with several built-in options that you can display
using a MESSAGE statement. The OpenEdge GUI for .NET provides
a similar choice of dialogs with a richer set of options, one based
on .NET forms and the other based on a message box that you
can display using the Show( ) method of
the MessageBox class.
The following table shows implementations for comparable dialogs using each type of GUI.
| OpenEdge GUI dialog | OpenEdge GUI for .NET dialog |
|---|---|
|
|
|
|
1 Setting the DialogResult property of a button to an appropriate DialogResult enumeration value causes this value to be automatically assigned to the DialogResult property of the dialog-box Form class when the user clicks the button in the form. Setting this property on a modal form automatically causes the dialog box to close and the ShowDialog( ) method to return. If you do not set the DialogResult property on a button, you must handle a button event (such as Click) in order to explicitly set the property on the form and close the dialog box.
2 When a GUI for .NET dialog box closes, .NET does not garbage collect the dialog box object unless you also call the Close( ) method on the dialog box, which automatically calls the Dispose( ) method to prepare the object for garbage collection. When a dialog box closes, .NET hides it from view so it can be re-displayed without having to re-create the object. So, to ensure that .NET garbage collects a dialog box after it closes, you must call Dispose( ) on the object to tell .NET to garbage collect it.