Share via


Overview | Methods | This Package | All Packages

OverviewMethodsThis PackageAll Packages

Application.getActiveForm

Retrieves a reference to the currently active form for the application.

Syntax

public static Form getActiveForm()

Return Value

Returns a Form object if there is an active form; otherwise, returns null.

Remarks

Use the getActiveForm method to retrieve the form that is currently active to perform actions on the form or its controls. If you are writing a Multiple Document Interface (MDI) application and want to get the active child form, use the Form.getActiveMDIChild method. Conversely, to gain access to an MDI child form's parent, use the getMDIParent method.