472,145 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 5061
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.