Beispiel #1
0
        private void tbNomSala_TextChanged(object sender, EventArgs e)
        {
            Validacion v = new Validacion();
            tbNomSala.Text = v.validar(tbNomSala.Text);
            tbNomSala.Select(tbNomSala.Text.Length, 0);
            tbNomSala.CharacterCasing = CharacterCasing.Upper;

            string txtAnt = tbNomSala.Text;
            if (tbNomSala.Text.Length > 1) {
                tbNomSala.Text = tbNomSala.Text.Substring(0, 1);
            }
        }
Beispiel #2
0
 public void TextBox_KeyPress(object sender, KeyPressEventArgs e)
 {
     Validacion v = new Validacion();
     if (v.validar(e))
         e.Handled = true;
     else
         e.Handled = false;
 }