冬眠
“如果你觉得自己在为傻瓜设计产品,那么很可能不仅无法设计出优秀的产品,而且连傻瓜也不喜欢你的设计。”--Paul Graham

导航

 

  在开发过程中,基本都需要实现帮助功能,而一般帮助功能就是打开一个帮助文档,System.Windows.Forms提供了Help类用于打开帮助文档,挺方便的。

  Help类提供的方法如下:

 NameDescription
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic member ShowHelp(Control, String) Displays the contents of the Help file at the specified URL.
Public methodStatic member ShowHelp(Control, String, String) Displays the contents of the Help file found at the specified URL for a specific keyword.
Public methodStatic member ShowHelp(Control, String, HelpNavigator) Displays the contents of the Help file found at the specified URL for a specific topic.
Public methodStatic member ShowHelp(Control, String, HelpNavigator, Object) Displays the contents of the Help file located at the URL supplied by the user.
Public methodStatic member ShowHelpIndex Displays the index of the specified Help file.
Public methodStatic member ShowPopup Displays a Help pop-up window.

 

  LZ一般使用ShowHelp(Control, String, HelpNavigator)方法:

  System.Windows.Forms.Help.ShowHelp(this, helpFilePath, System.Windows.Forms.HelpNavigator.TableOfContents);

  其中,this表示当前的窗体,helpFilePath为帮助文件路径,HelpNavigator指定帮助文件的显示元素。

  HelpNavigator:Specifies constants indicating which elements of the Help file to display.

 Member nameDescription
  AssociateIndex The Help file opens to the index entry for the first letter of a specified topic.
  Find The Help file opens to the search page.
  Index The Help file opens to the index.
  KeywordIndex The Help file opens to the topic with the specified index entry, if one exists; otherwise, the index entry closest to the specified keyword is displayed.
  TableOfContents The Help file opens to the table of contents.
  Topic The Help file opens to a specified topic, if the topic exists.
  TopicId The Help file opens to a topic indicated by a numeric topic identifier.
posted on 2013-09-12 17:26  无尽的冬眠  阅读(384)  评论(0编辑  收藏  举报