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

TCustomForm.Activate

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

Declaration

Source position: forms.pp line 630

protected procedure TCustomForm.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

TCustomForm.OnActivate

  

Handler signalled when the form instance receives focus.

TCustomForm.OnShow

  

Handler called when the form becomes visible.

TCustomForm.OnResize

  

Event handler signalled when the size for the form is changed.

TCustomForm.OnWindowStateChange

  

Handler called when the form is minimized, maximized or restored.

TCustomForm.Deactivate

  

Performs actions when the form loses focus.

TCustomForm.Visible

  

Indicates if the control is visible on its parent.

TForm.OnChangeBounds

  

Event handler signalled when the Bounds for the control have been changed.

TCustomForm.WindowState

  

Indicates whether the form is displayed in a minimized, maximized, full-screen or normal state.

TControl.OnChangeBounds

  

Event handler signalled when the Bounds for the control have been changed.

TControl.OnResize

  

Notification handler for a resize of the control.


Version 4.0 Generated 2025-05-03 Home