Group: Keyboard Input - Library: user32
Sets the keyboard focus to the specified window. The window must be attached to the calling thread"s message queue
HWND SetFocus(
HWND hWnd
); DECLARE INTEGER SetFocus IN user32;
AS SetFocusAPI INTEGER hWindow
hWnd [in] Handle to the window that will receive the keyboard input. If this parameter is NULL, keystrokes are ignored.
If the function succeeds, the return value is the handle to the window that previously had the keyboard focus.
DECLARE INTEGER SetFocus IN user32;
AS SetFocusAPI INTEGER hWindow
? SetFocusAPI(_screen.HWnd)See also: GetFocus, SetForegroundWindow, GetForegroundWindow, GetActiveWindow.
Home