Solved

Calling a Help File in VB

Posted on 2001-08-02
9
172 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

785 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