Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

open specific part of table of contents of chm file c# or vb.net

Tags:

c#

vb.net

chm

I have a .chm file called help, In that file I have a structure like:

Introduction
  -item1
  -item2
Topic1
  -item1
  -item2
Topic2
  -item1
  -item2
Topic3

Now I want to open Topic1 inside c# or vb.net I have tried:

 Help.ShowHelp(ParentForm, "Help.chm", HelpNavigator.Index, "Topic1")
 Help.ShowHelp(ParentForm, "Help.chm", HelpNavigator.TableOfContents, "Topic1")
 Help.ShowHelp(ParentForm, "Help.chm", HelpNavigator.Topic, "Topic1")
 Help.ShowHelp(ParentForm, "Help.chm", HelpNavigator.KeywordIndex, "Topic1")

but is not working, then I tried to give inside chm file an index to Topic1 (31) and tried:

 Help.ShowHelp(ParentForm, "Help.chm", HelpNavigator.Index, "31")
 Help.ShowHelp(ParentForm, "Help.chm", HelpNavigator.Index, "Item1")

It gives execption, only working code is:

 Help.ShowHelp(ParentForm, "Help.chm", HelpNavigator.TableOfContents, Nothing)

How to open Topic1 ?

like image 506
edgarmtze Avatar asked Oct 02 '13 03:10

edgarmtze


1 Answers

You can use the param parameter to provide further refinement of the Topic, TopicId, KeywordIndex, or AssociateIndex command. If the value specified in the command parameter is TableOfContents, Index, or Find, this value should be an empty string. If the command parameter references Topic, TopicId, KeywordIndex, or AssociateIndex, this value should be a string that contains the topic name, or the keyword or numeric identifier of the topic to display.

So answer was to do:

Help.ShowHelp(ParentForm, "helpFile.chm", "topicURL.htm")

The topicURL Found right clicking on opened topic:

enter image description here

then copy url:

enter image description here

like image 133
edgarmtze Avatar answered Sep 26 '22 14:09

edgarmtze