simplemente escriben este codigo en el evento kepress:
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)(Keys.Enter)) { e.Handled = true; SendKeys.Send("{TAB}"); } if (textBox1.Text.Length == 0) e.KeyChar = e.KeyChar.ToString().ToUpper().ToCharArray()[0]; else if (textBox1.Text.Length > 0) e.KeyChar = e.KeyChar.ToString().ToLower().ToCharArray()[0]; }
0 comentarios:
Publicar un comentario