![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
27/01/2012, 12:34
|
| | Fecha de Ingreso: noviembre-2004 Ubicación: Medellín
Mensajes: 121
Antigüedad: 20 años, 3 meses Puntos: 1 | |
Respuesta: validar números en c# Así podés pasar al otro textbox usando enter
private void texCedula_KeyPress(object sender, KeyPressEventArgs e)
{
if (Char.IsLetter(e.KeyChar))
{
e.Handled = false;
MessageBox.Show("Sólo se permiten Números");
texCedula.Clear();
}
else if (e.KeyChar == (char)Keys.Enter)
{
e.Handled = true;
butCancelar.Enabled = true;
texCedula.Enabled = false;
texNombres.Enabled = true;
texNombres.Focus();
}
} |