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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
All Courses

From novice to tech pro — start learning today.