How do you make an help file & how would you access it within a program?
Thanks for Listening(reading)
Printable View
How do you make an help file & how would you access it within a program?
Thanks for Listening(reading)
You can make it using the Help Workshop (Help Compiler) that is shipped with VB.
You call the Help file using a CommonDialog.
Code:With CommonDialog1
'Specify the location of the Help file
.HelpFile = "C:\QLMCW\Qlmcw.hlp"
'Tell WinHelp to display the Help Contents
.HelpCommand = cdlHelpContents
'Display the topic
.ShowHelp
End With
Here is the API method.
Code for a module.
This will display the Contents of the Help file you specifedCode:Declare Function WinHelp Lib "user32.dll" Alias "WinHelpA" (ByVal hWndMain As Long, ByVal lpHelpFile As String, ByVal uCommand As Long, dwData As Any) As Long
Public Const HELP_CONTEXT = &H1
Public Const HELP_QUIT = &H2
Public Const HELP_INDEX = &H3
Public Const HELP_HELPONHELP = &H4
Public Const HELP_SETINDEX = &H5
Public Const HELP_KEY = &H101
Public Const HELP_MULTIKEY = &H201
Public Const HELP_CONTENTS = &H3&
Public Const HELP_COMMAND = &H102&
Public Const HELP_CONTEXTPOPUP = &H8&
Public Const HELP_FORCEFILE = &H9&
Public Const HELP_PARTIALKEY = &H105&
Public Const HELP_SETCONTENTS = &H5&
Public Const HELP_SETWINPOS = &H203&
Code:RetVal = WinHelp(Me.hWnd, "C:\MyHelpFile.hlp", HELP_CONTENTS, 0)