J
jayderk
Hello All,
I have this code and am using a Qwerty keyboard device
private void txtCount_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
if(!(Char.IsLetterOrDigit(e.KeyChar)) && e.KeyChar != '\b')
{
e.Handled = true;
}
}
basically it ignores it if it is not a letter, digit, or backspace.
my question is :
on the qwerty keyboard letters and numbers are represented by the same key.
to get a number you have to hold the "function" button down while you press
the key. for example u=1, i=2, o=3..
on the keypress event how do change a U to a 1 if they forget to hold down
the funtion button? in this case it is for a textbox that is only ment for
digits so they push the U button they ment it to be a 1.
regards,
Jay
I have this code and am using a Qwerty keyboard device
private void txtCount_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e)
{
if(!(Char.IsLetterOrDigit(e.KeyChar)) && e.KeyChar != '\b')
{
e.Handled = true;
}
}
basically it ignores it if it is not a letter, digit, or backspace.
my question is :
on the qwerty keyboard letters and numbers are represented by the same key.
to get a number you have to hold the "function" button down while you press
the key. for example u=1, i=2, o=3..
on the keypress event how do change a U to a 1 if they forget to hold down
the funtion button? in this case it is for a textbox that is only ment for
digits so they push the U button they ment it to be a 1.
regards,
Jay