Solved

Calling a Help File in VB

Posted on 2001-08-02
9
174 Views
Last Modified: 2012-05-04
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?
0
Comment
Question by:dsa7
  • 6
  • 3
9 Comments
 

Expert Comment

by:GrahamAtJobserve
ID: 6344693
Try set the keypreview property on the MDI form and capture the F1 keystroke, then open the help file manually.
0
 

Expert Comment

by:GrahamAtJobserve
ID: 6344713
Or better still set the help menu accelerator key to F1
0
 

Author Comment

by:dsa7
ID: 6344714
How do I open the help file manually?
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.

 

Author Comment

by:dsa7
ID: 6344764
How do I open the help file manually?
0
 

Expert Comment

by:GrahamAtJobserve
ID: 6344776
try shelling winhelp with a command line
0
 

Expert Comment

by:GrahamAtJobserve
ID: 6344806
like this

Shell "winhlp32 " & App.HelpFile, vbNormalFocus
0
 

Accepted Solution

by:
GrahamAtJobserve earned 75 total points
ID: 6344819
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
 

Author Comment

by:dsa7
ID: 6345357
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
 

Expert Comment

by:GrahamAtJobserve
ID: 6345376
Wont that give a problem if you want to have a window list on your menus?

imaginative workaround though - I'm impressed.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 61
MsgBox 2 59
Access query that references subform 5 47
How does CurrentUser work? 10 39
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question