Solved

Calling a Help File in VB

Posted on 2001-08-02
9
171 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA open file from excel cell 4 36
Updates not working for MS Windows 7 12 152
How does CurrentUser work? 10 31
Add a task in Outlook from access 11 35
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…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

911 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

17 Experts available now in Live!

Get 1:1 Help Now