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

keypress event on textbox

P: n/a
I got a question about keypress event on textbox:

I found that the keypress event doesn't invoked when i press the "."
button on alphabetic keyboard, however if i use numberpad's "." button
keypress event is invoked.

Any idea and solutions?

Thanks.
Dec 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello windy,
I found that the keypress event doesn't invoked when i press the "." button on alphabetic keyboard, however if i use numberpad's "." button keypress event is invoked.
I just tried to test this. I threw a TextBox on a form and added a
KeyPress event handler with this line of code:

Debug.WriteLine("Key pressed: " + e.KeyChar);

Not surprisingly, I get an output line every time I hit a key in the
TextBox, including all the "." keys I have on my keyboard. There must be
some detail about what you're doing that you haven't mentioned so far...
Oliver Sturm
--
http://www.sturmnet.org/blog
Dec 16 '06 #2

P: n/a

Sorry I wrote it wrongly it should be combobox control not textbox...
"Oliver Sturm" <ol****@sturmnet.orgglsD:xn************* ***@msnews.microsoft.com...
Hello windy,
> I found that the keypress event doesn't invoked when i press the "."
button on alphabetic keyboard, however if i use numberpad's "." button
keypress event is invoked.

I just tried to test this. I threw a TextBox on a form and added a
KeyPress event handler with this line of code:

Debug.WriteLine("Key pressed: " + e.KeyChar);

Not surprisingly, I get an output line every time I hit a key in the
TextBox, including all the "." keys I have on my keyboard. There must be
some detail about what you're doing that you haven't mentioned so far...
Oliver Sturm
--
http://www.sturmnet.org/blog

Dec 17 '06 #3

P: n/a
Hello windy,
>Sorry I wrote it wrongly it should be combobox control not textbox...
Okay, I tried that, too - dropped a combo box on the form and added a
similar event handler. Same effect, nothing special to see with regard to
the "." or any other character.
Oliver Sturm
--
http://www.sturmnet.org/blog
Dec 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.