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

TApplication.OnActivate

Event handler signalled when an Activate message is handled in the application.

Declaration

Source position: forms.pp line 1750

public property TApplication.OnActivate : TNotifyEvent
  read FOnActivate
  write FOnActivate;

Description

OnActivate is a TNotifyEvent property with the event handler signalled when an Activate message is handled for the application.

OnActivate is signalled from the NotifyActivateHandler method, which occurs when the Activate method is called for the application. The event handler is also signalled (via Activate) from the WMActivate method in TCustomForm to ensure that the application is activated before one of its forms is updated in the task bar.

Use the OnDeactivate event handler to perform actions needed when the main form in an application is de-activated.

Use the TApplicationProperties class to assign properties and event handlers at design-time that are applied to the application instance at run-time.

See also

TApplication.NotifyActivateHandler

  

Notifies all Activate handlers for the application.

TApplication.AddOnActivateHandler

  

Adds an application activation handler.

TApplication.RemoveOnActivateHandler

  

Removes an application activation handler.

TApplication.OnDeactivate

  

Event handler signalled when a Deactivate message is handled in the application.

TApplicationHandlerType

  

Types of Application notification handlers.

TApplicationProperties

  

A component that provides access to the properties for the current application.


Version 3.2 Generated 2024-02-25 Home