Solved

Using HTML Help in a VB6.0 application

Posted on 1999-01-11
2
296 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:AndrewK
2 Comments
 
LVL 1

Accepted Solution

by:
delmar earned 100 total points
ID: 1455513
The problem is that the Common Dialog control was never updated to recognize CHM files as Help files.  To rectify this, I've placed both an ActiveX control and a DLL at http://www.vbexplorer.com/htmlhelp.htm for you to use.  The DLL is better as you don't need to include it on every form, and the source code for it is available as well.  It's nag-free freeware, as I made them available to fix this very problam.
0
 
LVL 2

Author Comment

by:AndrewK
ID: 1455514
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
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question