
Can't get the HelpProvider to work with the F1 key
I'm having a problem with the HelpProvider - it won't properly display
a topic when the user presses the F1 key.
I've added a HelpProvider control to my form, and set its HelpNamespace
property to the name of my CHM file. I named the control HelpProvider1.
Then I selected a button, and under its "Misc" set of properties, I
entered the following data:
- "ShowHelp on HelpProvider1" to "True"
- "HelpKeyword on HelpProvider1" to "Working with Old Folders"
- "HelpNavigator on HelpProvider1" to "KeywordIndex"
When the button gets the focus and I press F1, the appropriate help file
in the chm folder (Working with Old Folders.htm) is displayed, as expected.
But "Working with Old Folders" is both a topic AND is in the index, so I
wasn't sure which was getting used. The HelpNavigator property implied
the index was. But when I used a term that was ONLY in the index, the
Help display failed to display that term.
So I assumed there was a problem, and the HelpProvider really was doing a
topic lookup. But when I put in a term that was a topic (a htm file) and
also had several index entries, the "Topics Found" Help selection form
appeared, indicating an index lookup.
To add to my confusion, the cursor then turned into an hourglass, and
it wasn't possible to select any of the 4 list items! I tried to get
out of this mess by closing the dialog box. That action simply results in
a message that says "This program is not responding". The only way out
is to click button "End Now", which terminates the program and brings up
the form saying "Please tell Microsoft about this problem". Of course I
clicked "Send Error Report". :-)
The other alternative was to set HelpNavigator to "AssociateIndex",
since that seemed to imply a topic lookup. That almost worked. In this
case my HelpKeyword was "Preferences". But when the Help form appeared
after pressing F1, the keyword text box was initialized to simply "P",
and not "Preferences". Since there was no topic named "P", the text
pane displayed "The page cannot be displayed".
I've tried all the enumerated property settings on HelpNavigator, but
have been unable to find one that will simply retrieve and display my
named HTM file from the CHM file when the user presses the F1 key.
I also can't seem to find any significant information on the setup and
meanings of the properties of the HelpProvider. The system doesn't give
any examples either. A search of this newsgroup also wasn't productive..
Has anyone gotten this to work successfully? If so, what am I doing wrong?
Don Peters