RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Forms.ForegroundTask Function

Indicates whether the current thread is running in the foreground.

Pascal
function ForegroundTask: Boolean;
C++
Boolean ForegroundTask();

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.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!