T
Tony Brummel
Ok, I can't be the first to notice this but I can't find
anything on MSDN, TechNet, etc...
Create a simple Windows Form app and throw a couple
buttons on the form. Give each button a hotkey by
preceding a character in the .Text property with an &.
Now, run the thing and note that regardless of which
button the focus is on, simply pressing the hotkey letter
WITHOUT HOLDING DOWN THE ALT fires the hotkey (the button
press events in this case).
This has got to be a bug or there is some
strange "default" behavior with .NET Windows Forms. Has
anyone seen this? Any idea how to get around it?
Obviously, it's real bad news -- if the user has the
focus on button or datagrid, etc. (control that doesn't
want the key) and starts typing, the focus is "stolen"
once they stumble on a hotkey.
anything on MSDN, TechNet, etc...
Create a simple Windows Form app and throw a couple
buttons on the form. Give each button a hotkey by
preceding a character in the .Text property with an &.
Now, run the thing and note that regardless of which
button the focus is on, simply pressing the hotkey letter
WITHOUT HOLDING DOWN THE ALT fires the hotkey (the button
press events in this case).
This has got to be a bug or there is some
strange "default" behavior with .NET Windows Forms. Has
anyone seen this? Any idea how to get around it?
Obviously, it's real bad news -- if the user has the
focus on button or datagrid, etc. (control that doesn't
want the key) and starts typing, the focus is "stolen"
once they stumble on a hotkey.