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

Difference of Keypress and KeyDown event

P: n/a
What's the difference between Keypress and KeyDown event?
looks like some key cannot be handled by both event.
Can anyone list out the details and their usage for best pratice?
May 19 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
KeyPress is invoked only for character (printable) keys where as KeyDown is
raised for nonprintable such as Control, Shift, etc.

If you want to filter character input (such as allowing only numeric) then
KeyPress is a better choice.

"windy" wrote:
What's the difference between Keypress and KeyDown event?
looks like some key cannot be handled by both event.
Can anyone list out the details and their usage for best pratice?
May 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.