The SetForegroundWindow function puts the thread that created the specified
window into the foreground and activates the window. Keyboard input is
directed to the window, and various visual cues are changed for the user.
SetForegroundWindow( $hwnd );
-
$hwnd
- Handle of a window to be moved
to foreground
Returns TRUE if window was moved to foreground, FALSE otherwise.
The system assigns a slightly higher priority to the thread that created
the foreground window than it does to other threads. This is a simple wrapper
around Win32 function.