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

Assigning keys

P: n/a
Hi

Is there a way to assign Esc key to an action say closing a form dialog?

Regards
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"John" <jo**@nospam.infovis.co.uk> schrieb

Is there a way to assign Esc key to an action say closing a form
dialog?


Set the CancelButton property of the Form to the Cancel button. In the
button's click event write "me.close".
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

P: n/a
* "John" <jo**@nospam.infovis.co.uk> scripsit:
Is there a way to assign Esc key to an action say closing a form dialog?


Add a button to the form and assign it to the form's 'CancelButton'
property. Then set the button's 'DialogResult' property or add
'Me.Close' to the button's 'Click' event handler.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.