Solved

Calling a Help File in VB

Posted on 2001-08-02
9
170 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
 

Author Comment

by:dsa7
ID: 6344764
How do I open the help file manually?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now