Trucos de Visual Basic 6.0 Pasar de un TextBox a otro al pulsar Enter
Insertar tres TextBox y escribir el siguiente código:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
otra forma:
Insertar tres TextBox, cambiar la propiedad KeyPreview del formulario a True y escribir el siguiente código:
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Pon el truco en tus favoritos
Trucos relacionados de Pasar de un TextBox a otro al pulsar Enter
-
Truco de Visual Basic 6.0, 5 funciones de fechas
Gracias a este truco de visual basic 6.0 podrás: Saber la cantidad de días de un año determinado
Calcular la cantidad de días de un mes específico
Averiguar si un día corresponde a un fin de semana
Averiguar el último día de un Mes determinado
Ave