A class to help you show CHM files from within Visual Basic 5/6.
Include the class file clsHTMLHelp.cls in your project file.
If you want to load the help file from several different forms, then declare the class in a module:
Public hHelp as New HTMLHelp.
Place your help file in the folder as your exe or project file.
In you main form load event include the code:
App.HelpFile = App.Path & "\" & helpFileName
where helpFileName is a string holding the name of your help file.
Then when you want to load the help file, say in a menu selection, include the following code:
With hHelp
.CHMFile = App.HelpFile
.HHWindow = ""
.HHDisplayContents
End With
This will load the default page of your help file along with the table of contents.
There are many more options available using this class.
For example, you can load a particular link in your help file if you want.
There is a help file included with the class with instructions for its use. Best of all, it's free!
In your form unload or form terminate event procedure include the code:
hHelp.Close
set hHelp = nothing