Visual Basic
Declaration
To call WINHELP.EXE from a Visual Basic application, first declare the API function in the global module of your source:
Public Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
Enter the declaration on one line. Do not enter carriage returns.
Constants
Paste CONSTANT.TXT into your global module, or enter the following lines:
'Help Constants
Public Const HELP_CONTEXT = &H1 ' Display topic in ulTopic
Public Const HELP_QUIT = &H2 ' Terminate help
Public Const HELP_INDEX = &H3 ' Display index
Public Const HELP_CONTENTS = &H3&
Public Const HELP_HELPONHELP = &H4 ' Display help on using help
Public Const HELP_SETINDEX = &H5 ' Set current Index for multi index help
Public Const HELP_SETCONTENTS = &H5&
Public Const HELP_CONTEXTPOPUP = &H8&
Public Const HELP_FORCEFILE = &H9&
Public Const HELP_KEY = &H101 ' Display topic for keyword in offabData
Public Const HELP_COMMAND = &H102&
Public Const HELP_PARTIALKEY = &H105&
The comments are shown here on the line following the declarations because of space constraints. They can follow the declaration, on the same line.
See Also
Calling WinHelp()
Calling WinHelp Version 4.0 #define list Examples FuCommand Parameters HELP Context ID Property The HELPINFO Structure The HELPWININFO Structure The MULTIKEYHELP Structure The WM TCard Structure