Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

Keyboard Shortcuts, Windows, Alt Key

I have an Windows app for which I want the keyboard shortcuts to be shown.  By this I mean the underscore.  I understand that the user has to hit the alt key to show them, and that this was a Windows behavior change at some point.   How can I show them by default just within my app?
Avatar of Russ Suter
Russ Suter

This is done system-wide using the accessibility options in the Control Panel. If you wish to override this default behavior you'll probably need to subclass the Button control and override the OnPaint event. This means you need to handle painting the rectangle as well as the text. To fully implement this properly you'll need to deal with painting during hover and click actions as well. It's not impossible but it's a bit of a task.
Avatar of HLRosenberger

ASKER

that's too much work.  I thought maybe there was an easy way.  What about send the ALT key to my app?
ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks