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.
Declare Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow" (ByVal hwnd As Long) As Long
|Operating Systems Supported|
|Requires Windows NT 3.1 or later; Requires Windows 95 or later|
Identifies the window that should be activated and brought to the foreground.
|If the function succeeds, the return value is nonzero.|
If the function fails, the return value is zero. To get extended error information, call GetLastError.