i tried this :
but this way i can't press backspace too.... the cursor arrow and delete buttons work tho... how should i do this a better way?
thx in advanced...
C#:
oTB.KeyPress += new KeyPressEventHandler(TextBoxNumberOnly_KeyPress);
private void TextBoxNumberOnly_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if(!Char.IsNumber(e.KeyChar))
{ e.Handled = true; }
}
but this way i can't press backspace too.... the cursor arrow and delete buttons work tho... how should i do this a better way?
thx in advanced...