可以使用 Help 对象,以 HTML 帮助的格式显示已编译的帮助文件 (.chm) 或 HTML 文件。已编译的帮助文件可在页中提供目录表、索引、搜索和关键字链接。快捷方式仅适用于已编译的帮助文件。
private void showHelp_Click(object sender, System.EventArgs e)
{
// Display Help using the Help navigator enumeration
// that is selected in the combo box. Some enumeration
// values make use of an extra parameter, which can
// be passed in through the Parameter text box.
HelpNavigator navigator = HelpNavigator.TableOfContents;
if (navigatorCombo.SelectedItem != null)
{
navigator = (HelpNavigator)navigatorCombo.SelectedItem;
}
Help.ShowHelp(this, helpfile, navigator, parameterTextBox.Text);
}