SETFOCUS

Top  Previous  Next

Syntax

SETFOCUS(win as WINDOW,OPT id = 0 as UINT)

Description

Sets the input focus to a window, dialog or control.

Parameters

win - Window or dialog.

id - Optional control identifier.

Return value

None.

Remarks

The SETFOCUS command sends a WM_KILLFOCUS message to the window that loses the keyboard focus and a WM_SETFOCUS message to the window that receives the keyboard focus. It also activates either the window that receives the focus or the parent of the window that receives the focus.

Example usage

SETFOCUS win1, 17