Calling a Help File in VB

I have a help file that I am trying to call in VB.  The first form in the application is an MDI Form.  If I press F1 here with no other forms visible (loading a form into memory does not work, I have to actually show it) the help file will not display.  If I show another form and then press F1 the help file will come up.  In my main program I set App.Helpfile to my help file name with path.  How do I get the help file to come up when only the MDI form is open and how do I call the help file from a menu item?
dsa7Asked:
Who is Participating?
 
GrahamAtJobserveConnect With a Mentor Commented:
To conclude, this is the answer...

have F1 as the shortcut key in a help menu, and use the line of code

Sub mnuHelp_click()
     Shell "winhlp32 " & App.HelpFile, vbNormalFocus
End Sub
0
 
GrahamAtJobserveCommented:
Try set the keypreview property on the MDI form and capture the F1 keystroke, then open the help file manually.
0
 
GrahamAtJobserveCommented:
Or better still set the help menu accelerator key to F1
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
dsa7Author Commented:
How do I open the help file manually?
0
 
dsa7Author Commented:
How do I open the help file manually?
0
 
GrahamAtJobserveCommented:
try shelling winhelp with a command line
0
 
GrahamAtJobserveCommented:
like this

Shell "winhlp32 " & App.HelpFile, vbNormalFocus
0
 
dsa7Author Commented:
Shelling out works but not exactly the way I wanted it to.  As a workaround, I created a dummy form that blends into my mdimain background and show this form when I first load the app.  That seems to work.
0
 
GrahamAtJobserveCommented:
Wont that give a problem if you want to have a window list on your menus?

imaginative workaround though - I'm impressed.
0
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.