keypress event on textbox

  • Thread starter Thread starter windy
  • Start date Start date
W

windy

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.
 
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
 
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
 
Back
Top