Solved

Using HTML Help in a VB6.0 application

Posted on 1999-01-11
2
291 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now