HelpContextID Property

Returns or sets the context id number for invoking help for the object.

Syntax

Object.HelpContextID [ = lVal ]

The HelpContextID property syntax has the following parts:

 

Name

Type

Description

Object

Object

An object

lVal

Long

An integer specifying the context id number for invoking help for the object.

Where

lVal can be one of the following:

 

Value

Description

0 *

No context number specified.

> 0

An integer specifying a valid context number.

Comments

For context-sensitive Help on an object in the application, the same context number must be assigned to both object and to the associated Help topic when the Help file is compiled.

When a user presses the F1 key, the program automatically calls Help and searches for the topic identified by the current context number.

The current context number is the value of HelpContextID for the object that has the focus. If HelpContextID is set to 0, then the program looks in the HelpContextID of the object's container, and then that object's container, and so on. If a nonzero current context number can't be found, the F1 key is ignored.

Example

The following statement changes the ASwitch HelpContextID to point to item number 55 in the help file:

sw1.HelpContextID=55

Applies to

All controls and the following classes:

 

AForm

AMenu

See Also

Help, HelpFile, MsgBox, OnHelpContext, OnWhatsThisHelp, ShowWhatsThis, ToolTipText, WhatsThisButton, WhatsThisHelpID, WhatsThisHelpText, WhatsThisMode