Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 

Change the active control on a dialog.

 

Syntax

 

CONTROL SET FOCUS hWnd, ctrlID

 

Returns

 

None

 

Parameters

 

Name

Type

Optional

Meaning

hWnd

Number

No

Handle of the dialog containing the control

CtrlID

Number

No

Control identifier assigned to the control during CONTROL ADD ...

 

Remarks

 

The control that owns the focus will receive all keyboard messages. Many controls change their appearance when they receive (and lose) keyboard focus, usually by the display of a "focus rectangle" around or on the control that has keyboard focus. Only one control can have keyboard focus at any moment, and situations can arise where no controls have focus.

Controls that include a "notify" style (i.e., %BS_NOTIFY) will receive a notification message when focus is gained or lost. That is, when one such control loses focus, it receives a message to that effect and the control gaining focus may also receive an appropriate focus notification message.

When a control gains focus the parent dialog will also be set as the foreground window.

 

Restrictions

 

CONTROL SET FOCUS cannot be used to set the focus of a control in a separate thread.

 

See also

 

Examples

 

 

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software