[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

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?
0
tiseffies
Asked:
tiseffies
  • 2
1 Solution
 
AzraSoundCommented:
0
 
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.

Thanks
0
 
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.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now