I needed a textbox that will only allow numbers:
private void textBox_KeyPress(object sender, KeyPressEventArgs e) {
if (e.KeyChar != 8 && char.IsNumber(e.KeyChar) == false) {
e.Handled = true;
}
}
I needed a textbox that will only allow numbers:
private void textBox_KeyPress(object sender, KeyPressEventArgs e) {
if (e.KeyChar != 8 && char.IsNumber(e.KeyChar) == false) {
e.Handled = true;
}
}