Solved

Using HTML Help in a VB6.0 application

Posted on 1999-01-11
2
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

623 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