Ejemplo n.º 1
0
 private void StudentNameInput_KeyPress(object sender, KeyPressEventArgs e)
 {
     if ((((e.KeyChar < 'A') || (e.KeyChar > 'z')) && !(e.KeyChar == ' ') && !(e.KeyChar == '.') && !(Char.IsControl(e.KeyChar))) || (textBox1.Text.Length > 35))
     {
         e.Handled = true;
     }
     if (e.KeyChar == (char)Keys.Enter)
     {
         StudentNameInput.Focus();
     }
 }