private void textBox4_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsDigit(e.KeyChar))
{
}
else if (e.KeyChar == '\b')
{
}
else
{
e.Handled = true;
}
}

Join the conversation! Your thoughts help the community grow.