This example uses topics in the Visual Basic Help file and demonstrates how to specify context numbers for Help topics. To try this example, paste the code into the Declarations section of a Form object that contains a TextBox control and a Frame control with an OptionButton control inside of it. Run the example. Once the program is running, move the focus to one of the components, and press F1.
' Actual context numbers from the Visual Basic Help file.
' Define constants.
Const winPictureBox = 2016002
Const winCommandButton = 2007557
Private Sub Form_Load ()
App.HelpFile = "VB98.CHM"
Text1.HelpContextID = winPictureBox
Form1.HelpContextID = winCommandButton
End Sub