Try OpenEdge Now
skip to main content
GUI for .NET Programming
Using .NET Forms with ABL Windows : Managing form and window run-time behavior
 

Managing form and window run-time behavior

In a session where you access both forms and windows, you must work with each individual form and window using the native features supported for it. In other words, ABL does not map window attributes to form properties using associated window and form objects. For example, there is no TITLE attribute on a shadow window that you can use to set its form's Text property, and there is no Text property on a Progress.Window.FormProxy object to set the associated window's TITLE attribute.
Also, aside from the features that ABL supports for working with forms and windows in common, such as parenting and detecting focus for forms and windows or processing form and window events, several ABL elements have modified behavior when accessing .NET forms and windows compared to when accessing ABL windows alone. The following table lists these ABL elements and how accessing .NET forms might affect their operation in your ABL session.
Table 9. ABL elements that change behavior with .NET forms
ABL element
Behavior with .NET forms
ACTIVE-WINDOW system handle
Returns a read-only handle to the last window to receive an ENTRY event (focus). If a form (not a window) is the last to receive focus, this handle returns the Unknown value (?). To obtain an indication of the last form or window to receive focus, use the ACTIVE-FORM system reference. For more information, see Common focus detection for forms and windows.
ALWAYS-ON-TOP handle attribute
Specifies that the window is a topmost window that remains on top of all non-topmost windows (ABL or non-ABL) on the Windows desktop. .NET provides the TopMost property to specify the same behavior for a given form. Windows maintains separate categories for topmost and non-topmost windows across applications. So, you can specify both ABL topmost windows using the ALWAYS-ON-TOP attribute and .NET topmost forms using the TopMost property. All these topmost windows and forms remain on top of all non-topmost windows and forms, and users can move any topmost window or form to the foreground.
CURRENT-WINDOW system handle
Returns the handle to the window to which an ABL frame is parented when there is no parent specified for the frame. ABL frames cannot be parented to .NET forms. So, any attempt to assign the handle of a form's shadow window (specified by the ProWinHandle property) to CURRENT-WINDOW raises a run-time error.
DEFAULT-WINDOW system handle
Returns the handle to the default window created by the AVM at startup. This window displays all ABL frames until the CURRENT-WINDOW system handle is set to the handle of another [dynamic] window or unless a displayed frame is explicitly parented to another window. Its message area also displays messages that have no other available display destination. ABL frames cannot be parented to .NET forms. So, ABL ignores any attempt to assign the handle of a form's shadow window (specified by the ProWinHandle property) to DEFAULT-WINDOW, leaving its previous value unchanged.
LOAD-ICON( ) and LOAD-SMALL-ICON( ) handle methods
These methods allow you to load a large and small icon (respectively) to display for a window during common window operations, such as application switching and displaying on the taskbar. .NET provides the Icon property to specify a default icon for a form to display for these common window operations. You can maintain uniform icons across .NET forms and ABL windows in an application by using these methods to load the same large and small icon you are using to set the Icon property for .NET forms.
SHOW-IN-TASKBAR handle attribute
Specifies whether an icon for the window appears on the taskbar. .NET also provides a ShowInTaskbar property to specify the same behavior for forms. Windows has a setting to group multiple window icons under one icon from the same application on the taskbar. ABL windows do not conform to this setting and always display individually on the taskbar. However, .NET form icons can and do group on the taskbar according to this setting, even for forms created in an ABL session with ABL windows.
TOP-ONLY handle attribute
Indicates whether another window in the ABL session can overlay a specified window. Setting this attribute to TRUE allows the specified window to overlay all other .NET forms and non-TOP-ONLY ABL windows in the session. .NET does not support a similar property to allow a form to overlay all other forms and windows in a session.