Hi Brian,
I think we can try to use the helpProvider class to do the job.
private void Form1_Load(object sender, System.EventArgs e)
{
this.helpProvider1.HelpNamespace = "c:\\windows\\help\\calc.chm";
}
private void button1_Click(object sender, System.EventArgs e)
{
this.helpProvider1.SetHelpNavigator(this.button1,H elpNavigator.KeywordIndex
);
this.helpProvider1.SetHelpKeyword(this.button1,thi s.textBox1.Text);
this.helpProvider1.SetShowHelp(button1,true);
}
After we run the code and click the button1, the focus will be on the
button, and now if we press F1, the help file will be invoked and search
for the keyword in the help file.
To do this promatically, we may try to sendmessage F1 to do the job.
If you still have any concern, please feel free to post here.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.