469,602 Members | 1,826 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

KeyUp KeyDown :: e.KeyCode always return upper case letter.

Hi there,

I want to capture the last key press in a textBox.
So I decided to use KeyDown event and from the KeyEventArgs I read the
e.KeyCode
But when I type small letter the e.KeyCode always return upper case letter.
Is there any configuration so that I can capture the correct letter case?
Also in Vb I can change KeyAscii to another value. How can I do that in C#?

Regards,
kids
Nov 16 '05 #1
1 4705
KeyEventArgs.KeyCode is not a char, it's a scan code indicating which keys
were pressed on the keyboard by the user. You can check if the user pressed
shift or other modifier by looking at some of the other properties of
KeyEventArgs.

See the MSDN documentation for more information.
http://msdn.microsoft.com/library/de...classtopic.asp

Etienne Boucher
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Andy Chalkley | last post: by
2 posts views Thread by ZS | last post: by
4 posts views Thread by ShaneO | last post: by
13 posts views Thread by RishiD | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.