的CHM文件C#或目录的开放特定部分vb.net [英] open specific part of table of contents of chm file c# or vb.net

查看:157
本文介绍了的CHM文件C#或目录的开放特定部分vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为help的.chm文件,在该文件中我有一个结构:

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



现在我想在c#或vb.net里打开Topic1我试过:

  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)

但不工作,然后我试图给内部chm文件一个索引Topic1(31)并尝试:

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

它提供execption,只有工作代码是:

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

如何打开Topic1?

解决方案


您可以使用param参数进一步细化
Topic,TopicId,KeywordIndex或AssociateIndex命令。如果在命令参数中指定的值
是TableOfContents,Index或Find,
,该值应为空字符串。如果命令参数
引用Topic,TopicId,KeywordIndex或AssociateIndex,则此值
应为包含主题名称或要显示的主题的关键字或
数字标识符的字符串。


所以答案是:

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

topicURL找到右键打开的主题:






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 ?

解决方案

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:

then copy url:

这篇关于的CHM文件C#或目录的开放特定部分vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆