"If at first you don't succeed; call it version 1.0" :-Unknown

Pages

Friday, August 5, 2011

Create Shortkeys in Windows Application

Hi *.*,
I had done only 2 projects(Minor) in windows application (Desktop). I'm planning to improve my knowledge over their too...Starts from here... :)

Create a new form named form1.And add a menu-strip on design space now moving towards code side over their u can find a method InitializeComponent(); right click and Go To Definition over their u can find initializing menu-strip just down different events are initializing on the menu-strip. Find which one you need to add short key and create an instance of that at their.

Example for short key ctrl+N

this.[controlname].ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));

Stay tune...

Have a nice day... 'N happy Coding :)

No comments: