本文介绍了如何使用C#在Windows窗体中创建F1帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用c#在Windows窗体中创建键盘快捷键(F1)。 WinChm
How do you create the keyboard shortcut(F1) in a windows form using c#. WinChm
推荐答案
为控件的事件,然后使用。
Add an event handler for a control's HelpRequested event and then use the Help.ShowHelp.
例如,
private void button1_HelpRequested(object sender, HelpEventArgs hlpevent)
{
Help.ShowHelp(this, "helpfile.chm", HelpNavigator.TopicId, "1234");
}
您可以使用其他选项可显示目录等内容。
You can use different HelpNavigator options to show things like the table of contents, etc.
请参阅了解更多信息。
这篇关于如何使用C#在Windows窗体中创建F1帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!