Vcl.Forms.ForegroundTask
Delphi
function ForegroundTask: Boolean;
C++
extern DELPHI_PACKAGE bool __fastcall ForegroundTask(void);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Forms.pas Vcl.Forms.hpp |
Vcl.Forms | Vcl.Forms |
Description
Indicates whether the current thread is running in the foreground.
Call ForegroundTask to determine whether the current thread is executing in the Foreground. This is useful if you want to provide feedback to users only if they are currently interacting with a window on the same thread, but do not want to interrupt other processes.
ForegroundTask checks whether the window that currently has focus belongs to the thread that executes the function. It returns true if the focused window belongs to the current thread, false otherwise.