Quantcast
Viewing all articles
Browse latest Browse all 12583

Is it possible to set a ctrl hotkey for a winforms button and get the same behavior as an alt hotkey?

It's easy to set up an alt hotkey for a winform button by adding an & in front of the hotkey character in the text property of the button.  I'd like to add ctrl hotkeys for buttons and get exactly the same behavior.

It's easy enough to override ProcessCmdKey to execute certain button actions, but this doesn't show the user what the hotkeys are for buttons when you press the ctrl key.  Ideally, there would be a way to assign certain hotkeys to buttons, but don't see a way to do this.  Would the best approach be to extend Button and add additional hotkey behavior?

I'm using .net 4.0, VS 2010.

Thanks for any help!


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>