-
I'm sorry, I'm sure this is an easy thing to do, but I've never made a help file before. I've figured out how to make it, I've written it, I've made my App open it when you press F1, but :confused: how do I invoke it through code? I thought it would be a simple command like App.Helpfile.show or something. I can't seem to shell the file because it says it's not found. Is there a simple method?
Any help on this would be much appreciated.
-
using a Common Dialog Box:
Code:
Private Sub mnuHelp_Click()
With CommonDialog1
.HelpFile = App.HelpFile
.HelpCommand = &HB
.ShowHelp
End With
End Sub
-
That's more simpler.
You must say where your helpfile is by this instruction
Code:
App.HelpFile=App.path & "\HelpFile.hlp"
Next in the form properties, you have the HelpContextID. In this property, you must give the ID of the page of the help file you want to show. This ID is set when you make your help file.
After this, when you hit the F1 key on the form, the help file is load automaticaly and the right page is show.
PS : the properties HelpContextID is available for each VB control.
-
Thanks guys. I knew it would be something simple.
-
Oops!
It doesn't seem to want to open my help file. It comes up with a message saying it's invalid or corrupted, but if you press F1, it's fine. Perhaps it's because it's a Compiled HTML Help file rather than a standard windows one? Is there a different method for opening the TOC for this sort of Help file?
-
Whoops!
I don't know about html help.
You could cheat and do:
Code:
Private Sub mnuHelp_Click()
SendKeys "{F1}"
End Sub
-
:)Thank you Mark. That works like a charm. A very Zen approach.