Answered HelpProvider show topic

CopperKettle6

Member
Joined
Dec 8, 2020
Messages
7
Programming Experience
10+
Using HelpProvider to provide contexted help and works well for controls based using a chm file. However, want to be able to click on a button and bring up a specific topic. This was a piece of cake to do in VB6 but can't seem to figure out how to do with helpProvider. You would think the following statement would work but it does not - just goes to default topic rather than that specified with a "Can't Reach this page in the text area.

Help.ShowHelp(Me, HelpProvider1.HelpNamespace, "Name of desired topic")
 
Docs: Help.ShowHelp Method (System.Windows.Forms)

This version is for keyword: ShowHelp(Control, String, String)
it has to be a keyword defined in the chm source as I understand it.

You can use this for topic: ShowHelp(Control, String, HelpNavigator, Object)
where value HelpNavigator.Topic is used and last parameter is the topic string.

If you don't have the chm source and know the topic strings (and don't want to decompile it) you can right-click a page and select Properties, the end of Address may look like this "classic.chm::/CustomerAdd.html" where "CustomerAdd.html" is the topic string.
 
Docs: Help.ShowHelp Method (System.Windows.Forms)

This version is for keyword: ShowHelp(Control, String, String)
it has to be a keyword defined in the chm source as I understand it.

You can use this for topic: ShowHelp(Control, String, HelpNavigator, Object)
where value HelpNavigator.Topic is used and last parameter is the topic string.

If you don't have the chm source and know the topic strings (and don't want to decompile it) you can right-click a page and select Properties, the end of Address may look like this "classic.chm::/CustomerAdd.html" where "CustomerAdd.html" is the topic string.
Thanks for your assistance. I am putting together the chm file using third party too. You mention of navigator.topic got me moving in that direction and it turns out the following statement does what I need:

Help.ShowHelp(Me, HelpProvider1.HelpNamespace, HelpNavigator.KeywordIndex, "System Data Entry")

using .keywordindex rather than .topic.
 
Back
Top