Description

Occurs when a character is entered.

Syntax

bforward = CHAR (ctrlentID, ctrlclassID, virtcode, scancode, ctrl, shift, alt)

Parameters

CHAR accepts arguments for the following parameters.

ParameterDescription
CtrlentIDHas the format WindowName.ControlName, where WindowName is the identifier of the window that contains the affected control, and ControlName is the identifier of the control. Notice that a period separates the two values.
ctrlclassID

The type of control that recognizes the event. Valid entries are:

TypeDescription
COMBOBOXCombo box.
EDITBOXEdit box.
EDITFIELDEdit line.
EDITTABLEEdit table.
LISTBOXList box.
virtcodeVirtual-key code (refer to Windows 3.1 SDK, WM_CHAR message, for more information).
scancodeScan code (refer to Windows 3.1 SDK, WM_CHAR message, for more information).
ctrlTrue (1), if the ctrl key is pressed. False (0), if the ctrl key is not pressed.
shiftTrue (1), if the shift key is pressed. False (0), if the shift key is not pressed.
altTrue (1), if the alt key is pressed. False (0), if the alt key is not pressed.

Returns

True or false. If false, the program execution returns to the calling procedure. If true, the event processing goes to the next level.

See also

ECHO property

Remarks

Not all keystrokes generate a CHAR event. To execute an event for keys which do not generate the CHAR event, create menu items with the desired accelerators.

Note: For forms that should not have menus, like dialogs, the menu items can be hidden and the accelerators will still work.

  • No labels