By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,375 Members | 3,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,375 IT Pros & Developers. It's quick & easy.

Shortcut Key question (i.e. "&Submit")

P: n/a
rh
I have a Button on a WinForm that has a text property = "&Submit".

I noticed that whenever I pressed the "S" key only (without pressing the
"Alt" key) the Button's click event would fire. I thought that it was only
supposed to fire if the combo "Alt+S" was pressed.

My problem is that I have another control (a DataGrid) that is suppoed to
respond to the "S" key being pressed and I don't want the Button's click
event to be fired. I only want it to be fired if the combo "Alt+S" is
pressed.

Any suggestions?
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"rh" <rh******@smci.com> schrieb:
I have a Button on a WinForm that has a text property = "&Submit".

I noticed that whenever I pressed the "S" key only (without pressing the
"Alt" key) the Button's click event would fire. I thought that it was only
supposed to fire if the combo "Alt+S" was pressed.

The button's 'Click' event is fired by pressing the S key if a control that
doesn't expect user input (like a button, for example) has focus. Alt+S
will work too if a textbox has the input focus.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.