See Also Example
Applies To
App object, common dialog
Description
Determines the name of the Microsoft Windows Help file for an application.
Usage
{ [form.]cmdialog|App}.HelpFile[ = filename]
Remarks
If you've created a Microsoft Windows Help file for your application and set the application's HelpFile property, Visual Basic automatically calls Help when a user presses the F1 key. If there is a context number in the HelpContextID property for either the active control or the active form, Help displays a topic corresponding to the current Help context; otherwise it displays the main contents screen.
Note Building a Help file requires the Microsoft Windows Help Compiler, which is available with the Visual Basic Professional Developer's Edition.
Data Type
String
Help:
HelpContextID Property
Visual Basic Professional Developer's Edition:
Help Compiler Guide
HelpContextID, HelpFile Properties Example
The 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 that contains a text box and a frame with an option button inside the frame. Then press F5. 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.
Const winColorPalette = 21004 ' Define constants.
Const winToolbox = 21001
Const winCodeWindow = 21005
Sub Form_Load ()
App.HelpFile = "vb.hlp"
Frame1.HelpContextID = winColorPalette
Text1.HelpContextID = winToolbox
Form1.HelpContextID = winCodeWindow
End Sub