Using the traditional OpenEdge GUI, the ACTIVE-WINDOW system handle returns the handle of the last non-modal ABL window to generate an ENTRY event (that is, the last window to receive focus). If you use .NET forms, you can use the static ActiveForm property on System.Windows.Forms.Form to return the object reference to the last non-modal form to receive focus. However, when you use .NET forms and ABL windows together, you cannot use these two mechanisms to reliably determine the most recent non-modal form or window to receive focus. If a form is the last to receive focus, ACTIVE-WINDOW returns the Unknown value (?), and if a window is the last to receive focus, the static ActiveForm property returns an object reference with no meaning to the ABL session context.
Instead, to identify the last form or window to receive focus, ABL provides the ACTIVE-FORM system reference.
ACTIVE-FORM returns a Progress.Windows.IForm interface reference to a form object on the form chain (see
ABL session architecture for forms and windows). Thus, depending on the object that received the last focus,
ACTIVE-FORM can return a reference to a .NET form object instantiated from Progress.Windows.Form (or a derived class)) or a reference to the Progress.Windows.FormProxy object associated with an ABL window that you have created in the session.
If last focus is in the client area of an embedded ABL window,
ACTIVE-FORM returns a
Progress.Windows.IForm reference to the
Progress.Windows.Form (or derived form) that embeds the ABL window. For more information, see
EmbeddingABL windows in .NET forms.