[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Forms' (#lcl)

# TCustomForm.Active

Indicates if the form is enabled, visible, and has focus.

## Declaration

Source position: forms.pp line 763

`public property TCustomForm.Active : Boolean read FActive;`

## Description

Active is a read-only Boolean property which indicates if the form is enabled, visible, and has focus.

The SetActive method is used to update the value for the property, locate an ActiveControl for the form, and give focus to the form control. SetActive is called from the WMActivate method when the LM_ACTIVATE window control message is handled for the form.

The value in Active is used in the FocusControl method. It causes SetFocus to be called when its value is False. It is also used in the SetActiveControl method to determine if the window already has focus when the active control is changed.