Adding a Help File

pjfatboy
06-24-2003, 08:30 AM
I have already created and compiled my help file but not sure how to get it to load in my program. I added a Comman Dialog Box to my form, and in the project properties I put the link to my help file in the Help File Name box. Not sure where to go from here. Thanks for any help.

John
06-24-2003, 09:30 AM
You should be able to just run the program and press F1 to access the help file.

pjfatboy
06-24-2003, 09:53 AM
You should be able to just run the program and press F1 to access the help file.

That is what I thought, but it doesn't. Do I have to put any command in my mnuHelp and Form Load to get the Help File to work?

John
06-24-2003, 10:04 AM
This will happen when you assign F1, through the menu editor, to be the shortcut to the help menu item thinking that it needs to be there. Visual Basic will automatically uses F1 for the help file you have assigned to the project. To get around it you remove the shortcut to that menu item and then change it's caption in your form load to make it look like there is a shortuct assigned to it when there really isn't. Something like this:
Private Sub Form_Load()
mnuContents.Caption = mnuContents.Caption & vbTab & "F1"
End SubThen in the click event of that menu item just use the built in sendkeys function to send F1 to your window like this:
Private Sub mnuContents_Click()
SendKeys "{F1}"
End Sub

pjfatboy
06-24-2003, 10:29 AM
This will happen when you assign F1, through the menu editor, to be the shortcut to the help menu item thinking that it needs to be there. Visual Basic will automatically uses F1 for the help file you have assigned to the project. To get around it you remove the shortcut to that menu item and then change it's caption in your form load to make it look like there is a shortuct assigned to it when there really isn't. Something like this:
Private Sub Form_Load()
mnuContents.Caption = mnuContents.Caption & vbTab & "F1"
End SubThen in the click event of that menu item just use the built in sendkeys function to send F1 to your window like this:
Private Sub mnuContents_Click()
SendKeys "{F1}"
End Sub

This still does not load my help file. I must be missing something. Do I need a common dialog on my form for the help file to load?

John
06-24-2003, 10:34 AM
no

Go through all your menu items and remove the one with the F1 shortcut assigned to it and it will work.

Maybe just to test it you should create a new blank project and assign your help file to the project through the project properties and run the program, press F1 and see it appear.

pjfatboy
06-24-2003, 10:39 AM
no

And the only thing I need to add to my project for the help file is the Help File Name in the Help File Name box in project properties.

pjfatboy
06-24-2003, 10:52 AM
no

And the only thing I need to add to my project for the help file is the Help File Name in the Help File Name box in project properties.

Wait i'm getting close. If I push the F1 key nothing happens. If I click the Help Item under Help on the Menu bar nothing happens, but if I click Help on the Menu bar but don't click on the Help Item and push the F1 Key the Help File loads. What's up with that.

John
06-24-2003, 03:49 PM
can you post the project, because I can't figure out what you are doing.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum