473,395 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

keypress event on textbox

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
3 2087
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

Sorry I wrote it wrongly it should be combobox control not textbox...
"Oliver Sturm" <ol****@sturmnet.org¼¶¼g©ó¶l¥ó·s»D: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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Darryn Ross | last post by:
Hi, I am trying to catch the KeyPress event on my datagrid but it isn't working... i have also tried registering the handler with the event like this... dgGLBatch.KeyPress += new...
0
by: Hal Gibson | last post by:
Because of a legacy (originally DOS) Sub Procedure "AlphaInput" that is called in thousands of places in our code, I need to be able to set a variable, "KeyedString",to the value of TextBox.Text...
6
by: Niksa Baldun | last post by:
Hi, I am trying to capture data from magnetic stripe reader which is connected via keyboard interface (therefore indistinguishable from normal keyboard input). Basically, I am doing the...
4
by: Tom | last post by:
I have a VB.NET user control that I wrote - this control has three or four other controls on it (textbox, combobox, datetime picker, etc). Now, whenever the control is on a form and the user enters...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
3
by: Fia | last post by:
Hi In Visual Basic 6 I could call keypress with an integer of a choosen key. For example I could call a textbox's keypress with the number 13 (for the enter key). But now in Visual Basic .Net I...
7
by: Kay | last post by:
Hi all, I want to create a small function to monitor the keystroke. For example, if user key in a comma, I want to replace it with a single quote(etc)... In vb6 I an simply check the KeyAscii...
5
by: Henry Jones | last post by:
I am new to C# and wanted to capture the KeyPress for a textbox. I created some code as follows: private void textBox3_KeyPress(object sender, System.EventArgs e) { this.textBox2.Text =...
2
by: Tony Johansson | last post by:
Hello! I have created a Control that consist of a label and a textbox.I have called this class ctlLabelTextbox. public partial class ctlLabelTextbox : UserControl { .... } The class that I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.