Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using HTML Help in a VB6.0 application

Posted on 1999-01-11
2
Medium Priority
?
316 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 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

876 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