How to give keyboard shortcut to Command Button
-
Dear all, I am trying to find the easiest way to give a keyboard shortcut to a command button like CTRL+K or F9 etc. Can i also give the shortcut key to ToolStripButton? How? Thanks...
-
Dear all, I am trying to find the easiest way to give a keyboard shortcut to a command button like CTRL+K or F9 etc. Can i also give the shortcut key to ToolStripButton? How? Thanks...
Hi, i dont think there is a direct way to assign CTRL combination to command button. but you can always use the ALT+ combination by just typing the "&" before the character in the button text property. if you anyway want to give CTRL combination or F9 like shortcut key you can use the form keydown event and check for the key combination pressed and raise the button_click event manually. Hope this works. Nitin...
-
Dear all, I am trying to find the easiest way to give a keyboard shortcut to a command button like CTRL+K or F9 etc. Can i also give the shortcut key to ToolStripButton? How? Thanks...
Hello Handle the KeyUp event in all possible control that would receive this combination. you can point them all to one event handler BTW. Then in that event handler check for the combination. If true call
MyToolStripButton.PerformClick()
method, or use a common method to do the job.Regards:rose: