HelpCommand, HelpFile, HelpKey Properties Example, Common Dialog Control

The example executes WINHELP.EXE and displays the Help topic for the MouseDown event from the Visual Basic Help file (VB.HLP) when the user clicks a command button.

Sub Command1_Click ()
  Const HELP_KEY = &H101
  CMDialog1.HelpFile = "VB.HLP"    ' Specify the Help file to open.
  CMDialog1.HelpCommand = HELP_KEY ' When WINHELP.EXE is executed, Help for a specified keyword will be displayed.
  CMDialog1.HelpKey = "MouseDown"  ' Specify the keyword.
  CMDialog1.Action = 6             ' Execute WINHELP.EXE.
End Sub