本文介绍了的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?

解决方案

所以答案是:

  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 ?

解决方案

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 05:09