private void textBox4_KeyPress(object sender, KeyPressEventArgs e) { int ascii = Convert.ToInt16(e.KeyChar); if ((ascii >= 97 && ascii <= 122) || (ascii >= 65 && ascii <= 90) || (ascii == 8)) { e.Handled = false; } else { e.Handled = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)