How make button F1 ( Help ) enable in my application ?
-
Hi, I have some Form ( WinForm ) that on him i have button "Help". I want to make the keyboard button F1 enable and in case that the application user will press on the F1 => then the help button will be press / or the some method in my application will be call. How to do it ? Thanks for any help.
-
Hi, I have some Form ( WinForm ) that on him i have button "Help". I want to make the keyboard button F1 enable and in case that the application user will press on the F1 => then the help button will be press / or the some method in my application will be call. How to do it ? Thanks for any help.
Yanshof wrote:
have some Form ( WinForm ) that on him i have button "Help".
You can set short cut key for that menu as F1. Then menu code will be called
-
Yanshof wrote:
have some Form ( WinForm ) that on him i have button "Help".
You can set short cut key for that menu as F1. Then menu code will be called
-
Create a new form - This form will be the help window. Now, click in the main form, and set it's KeyDown event. Write the following code in the event handler:
if (e.KeyCode == Keys.F1)
{
HelpForm helpForm = new HelpForm();
helpForm.ShowDialog();
}If your help form isn't called 'HelpForm' then write the correct name instead of.
Virtual1ty
"Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
-
Hi, I have some Form ( WinForm ) that on him i have button "Help". I want to make the keyboard button F1 enable and in case that the application user will press on the F1 => then the help button will be press / or the some method in my application will be call. How to do it ? Thanks for any help.
Just handle
Form.HelpRequested
event :) Edit: If ya want to have a "question mark"-button in the top-right corner, setHelpButton
property to true and bothMaximizeBox
andMinimizeBox
to false; -- modified at 11:50 Tuesday 25th September, 2007Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
-
Hi, I have some Form ( WinForm ) that on him i have button "Help". I want to make the keyboard button F1 enable and in case that the application user will press on the F1 => then the help button will be press / or the some method in my application will be call. How to do it ? Thanks for any help.
Why not add a System.Windows.Forms.HelpProvider by dropping one onto your form, set its HelpNamespace to the .chm file you want to open and then in your form's properties, set the HelpKeyword and HelpNavigator properties? the Visual Studio 2005 documentation has an example in C# for the HelpProvider class. Good Luck!
It isn't enough to do well in life. One must do good when and where one can. Otherwise, what's the point?