Ver Mensaje Individual
  #9 (permalink)  
Antiguo 11/04/2008, 14:38
ManuelV
 
Fecha de Ingreso: octubre-2003
Mensajes: 101
Antigüedad: 21 años, 4 meses
Puntos: 0
Re: C#: Como puedo sustituir la tecla TAB por Enter ??

Cita:
Iniciado por Peterpay Ver Mensaje
es c# o vb net

veo una mezcla

si es c#

private void txtNroPersonas_KeyDown(object sender, KeyEventArgs e)
{
If( e.KeyCode = Keys.Enter)
Me.txtCantidad.Focus();

}
ES C#

Peter, al ejecutar me dice que falta el punto y coma despues de If( e.KeyCode = Keys.Enter)
le coloco el punto y coma ==> If( e.KeyCode = Keys.Enter) ;
y despues me salen estos errores

Error 1 El nombre 'If' no existe en el contexto actual C:\Proyectos Visual.NET\GesCas\GesCas\ComandaForm.cs 383 13 GesCas

Error 2 No se puede asignar la propiedad o el indizador 'System.Windows.Forms.KeyEventArgs.KeyCode' (es de sólo lectura) C:\Proyectos Visual.NET\GesCas\GesCas\ComandaForm.cs 383 16 GesCas

Error 3 El nombre 'Me' no existe en el contexto actual C:\Proyectos Visual.NET\GesCas\GesCas\ComandaForm.cs 384 13 GesCas