API:Vcl.AppEvnts.TApplicationEvents.OnIdle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnIdle;

C++

__property OnIdle;

Properties

Type Visibility Source Unit Parent
event published
Vcl.AppEvnts.pas
Vcl.AppEvnts.hpp
Vcl.AppEvnts TApplicationEvents

Description

Occurs when an application becomes idle.

Vcl.AppEvnts.TApplicationEvents.OnIdle inherits from Vcl.AppEvnts.TCustomApplicationEvents.OnIdle. All content below this line refers to Vcl.AppEvnts.TCustomApplicationEvents.OnIdle.

Occurs when an application becomes idle.

Write an OnIdle event handler to perform special processing when an application is idle. An application is idle when it is not processing code. For example, an application is idle when it is waiting for input from the user.

OnIdle is called only once, as the application transitions into an idle state. It is not called continuously unless Done is set to false. Applications that set Done to false consume an inordinate amount of CPU time, which affects overall system performance.

Note: Call the CancelDispatch method from an OnIdle event handler to prevent the application from forwarding the event to any other application events objects.

See Also

Code Examples