Just a quick question but is it possibl开发者_如何学JAVAe to open a helpProvider?
All I want is open a CHM help file when I click a button in addition to the F1 key?
If it’s not possibly anyone know of a work around?
Thanks Peter
I think you mean a Windows Forms Application.
There is a Windows Forms Control called HelpProvider that does it for you.
System.Windows.Forms.HelpProvider hlpProvider = new System.Windows.Forms.HelpProvider();
hlpProvider.SetShowHelp(this, true);
// Help file
hlpProvider.HelpNamespace = "helpFile.chm";
You can open your help file with
Process proc = new Process();
proc.StartInfo.FileName = "helpFile.cfm";
proc.Start();
private void MainMenu_Load(object sender, EventArgs e)
{
helpProvider1.HelpNamespace = Application.StartupPath + "\\filename.chm";
helpProvider1.SetShowHelp(this, true);
}
private void HelpText_Click(object sender, EventArgs e)
{
Help.ShowHelp(this, helpProvider1.HelpNamespace);
}
Good luck ^_^
精彩评论