Avatar of tiseffies

asked on 

How do I call my own .chm file within a VB5 application from sub-windows.

Hi All

I am currently developing an app using vb5. I was using a help file in the .hlp format.
I recently converted my help file to .chm format.
I realized later that this format is not compatible with vb5 after reading it up.
So now I'm trying to patch up my application so that I use an accelarator key F1 on a mdi menu, so that when I press F1 I get my .chm file; using the HtmlHelp dll behind the menu call.
However, if any window is open besides the MDI, I get the well known error "File x not a windows file or file is corrupted". I think that is because F1 on its own tries to bring up the Help file associated with the app ie. App.HelpFile which would by default can only be a .hlp file in vb5.
Basically I want to call the Help file .chm without modifying all 100 forms properties or form events in the project.
Any ideas?
Visual Basic Classic

Avatar of undefined
Last Comment
Avatar of AzraSound
Flag of United States of America image

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of tiseffies


As far as I can see a handle needs is the sethotkey routine's main argument,
and a handle can be obtained on a window, but not on the whole application.
So, this won't fix my problem. Can you think of a way to centralize the sethotkey call so that its called when any windows/forms are open? Again, I don't want to modify every form.

Avatar of tiseffies


I found the answer in my code, basically I had to clear the App.HelpFile setting both in the Project settings, and in the code to force the module to trigger the F1 option

You didn't give me the answer, but kept me going to solve it.
Thanks for your input.
Visual Basic Classic
Visual Basic Classic

Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo