Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.15 KB

File metadata and controls

50 lines (34 loc) · 1.15 KB

Home

Function name : SetFocus

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


Declaration:

HWND SetFocus(
	HWND hWnd
);  

FoxPro declaration:

DECLARE INTEGER SetFocus IN user32;
AS SetFocusAPI INTEGER hWindow
  

Parameters:

hWnd [in] Handle to the window that will receive the keyboard input. If this parameter is NULL, keystrokes are ignored.


Return value:

If the function succeeds, the return value is the handle to the window that previously had the keyboard focus.


Comments:

DECLARE INTEGER SetFocus IN user32;  
	AS SetFocusAPI INTEGER hWindow  
? SetFocusAPI(_screen.HWnd)

See also: GetFocus, SetForegroundWindow, GetForegroundWindow, GetActiveWindow.