Sign in Join
FPDoc Onlineexperiment

TCustomForm.Activate procedure

Member of TCustomFormprotectedIn unit Forms

Signals the OnActivate event handler when a form is focused in an application.

Declaration

pascal
procedure Activate; virtual

Description

Activate is a procedure used to signal the OnActivate event handler (if assigned) when the form is focused in an application. Activate is called when the CM_Activate message is handled for the form. It is called after the OnShow event is signalled in the DoShow method.

Activate uses an internal member to determine whether the form is being focused for the first time, or following a change of focus between forms. No actions are performed in the method when the form is being focused for the first time and the WindowState property contains wsMaximized or wsFullScreen.

Use OnShow to respond to the event notification performed when the form is displayed for the first time.

Use OnChangeBounds or OnResize to respond to delayed changes to the form bounds (position) or resize events.

See Deactivate for the actions performed when the form instance loses focus.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.