Saltar al contenido
Underc0de /foro

Como pasar de un texto a otro usando Enter

Iniciado por ANTRAX, Julio 26, 2010, 10:28:10 AM

Tema anterior - Siguiente tema

0 Miembros y 2 Visitantes están viendo este tema.

Avatar de ANTRAX
Julio 26, 2010, 10:28:10 AM Ultima modificación: Julio 08, 2011, 10:05:24 AM por ANTRAX
Insertar tres TextBox y escribir el siguiente código:

Código: vb
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:

Código: vb
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
WhatsApp Telegram


¿Te quedó una duda sobre Códigos Fuentes?

Preguntala y te responde la comunidad (y el asistente Underc0de IA si nadie llega antes). Es gratis y tarda un minuto.

Ya tengo cuenta
Guardamos tu pregunta en este navegador: después de entrar la publicás con un clic.
Grupo de WhatsApp