Home > DeveloperSection > Forums > How can make shortcut keys in my windows form?
jayprakash sharma
jayprakash sharma

Total Post:117

Posted on    October-07-2013 8:51 AM

 C# C# 

 1 Reply(s)
 919  View(s)
Rate this:
I need to make a shortcut key for open a new form in my application how I can do that task.

Manoj Bhatt
Manoj Bhatt

Total Post:153

Posted on    October-08-2013 1:09 AM

1.       Create a demo project with 2 windows form

2.       Then you can add the below code in your form1_keyDown event

if (e.Control && e.KeyCode == Keys.N)


     Form2 f2 = new Form2();



e.Control : This mean hold the control key

e.KeyCode == Keys.N: This mean press the N key form your keyboard

Don't want to miss updates? Please click the below button!

Follow MindStick