Vcl.Forms.TApplication.OnIdle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnIdle: TIdleEvent read FOnIdle write FOnIdle;

C++

__property TIdleEvent OnIdle = {read=FOnIdle, write=FOnIdle};

Properties

Type Visibility Source Unit Parent
event public
Vcl.Forms.pas
Vcl.Forms.hpp
Vcl.Forms TApplication

Description

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 the Done parameter is set to false. Applications that set Done to false consume an inordinate amount of CPU time, which affects overall system performance.

Note: You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.

See Also

Code Examples