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?
Who is Participating?
tiseffiesAuthor Commented:
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.

tiseffiesAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.