Link to home
Start Free TrialLog in
Avatar of AndrewK
AndrewK

asked on

Using HTML Help in a VB6.0 application

I have an HTML Help file (help.chm) that I wish to attach to my VB6.0 app. I can do this without a problem by specifying:
App.HelpFile = App.Path + "\help.chm"
When I press F1 I get the HTML Help file in working order. My problem lies in getting the help file to appear when I select 'Help Contents' from my Help option in the menu bar. The code I used is as follows:
Private Sub mnuHelpContents_Click()
   ctlComDlg.HelpFile = App.Path + "\help.chm"
   ctlComDlg.HelpCommand = &HB
   ctlComDlg.ShowHelp
End Sub

When selecting the help option I get a message saying the help file referenced is not a valid Windows Help file or it is corrupt. The routine seems to be looking for the old WinHelp.exe instead of the new HTML Help. How do I get it to do what it should - aka pressing the F1 key?

Many Thanks.
Andrew
ASKER CERTIFIED SOLUTION
Avatar of delmar
delmar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AndrewK
AndrewK

ASKER

I did solve my problem by going into the Windows API. However, the solution provided by Delmar is far more complete and user friendly. I suggest anyone with a similar problem to the one expressed by myslef use this as the solution.

Cheers!
AndrewK