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

# TApplication.OnIdle

Event handler signalled when the application enters the idle state.

## Declaration

Source position: forms.pp line 1751

`public property TApplication.OnIdle : TIdleEvent read FOnIdle write FOnIdle;`

## Description

OnIdle is a TIdleEvent property with the event handler signalled when the application enters the idle state. Assign an object procedure to the event handler to perform actions needed when other window or control messages are not present.

It is signalled from the Idle method, and occurs after released components and asynchronous callbacks have been processed for the application. It occurs before the NotifyIdleHandler method is called to process other application handlers using the ahtIdle type.

Any actions performed in the event handler should have a short duration, and relatively low resource requirements. This will ensure that system performance is not adversely affected, and the application is responsive.

Use OnIdleEnd to perform actions needed when the application leaves the idle state.

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

## See also

TApplication.Idle |  | Called when the application enters the idle state.
TApplication.NotifyIdleHandler |  | Signals all idle handlers for the application.
TApplication.OnIdleEnd |  | Event handler signalled when the application leaves the Idle state.
TApplicationHandlerType |  | Types of Application notification handlers.
TApplicationProperties |  | A component that provides access to the properties for the current application.