INSTITUTO SUPERIOR JESÚS MARÍA - insjem2011.blogspot.com - Desarrollado por: Alejandro Montaño Cayoja
E-Mail del blog: insjem2011@hotmail.com

Entradas en el blog

ACTIVIDADES (6) Adobe (1) ANTIVIRUS (5) Apple (1) Chrome (1) CÓDIGOS (6) COMANDOS (1) CURIOSIDADES (11) DATOS (13) DESCARGAS (7) Discos_Duros (1) Facebook (1) Fedora (1) Firefox (5) Firewall (1) FOTOGRAFIAS (4) Google (1) HARDWARE (1) HERRAMIENTAS (4) HUMOR (1) IExplorer (2) IMAGENES (7) INSJEM (17) Intel (1) INTERNET (20) JUEGOS (1) Linux (1) Microsoft (1) MySQL (1) NOTICIAS (25) Opera (2) Otros (4) PHOTOSHOP (5) PostgreSQL (1) REDES_SOCIALES (4) RESPUESTAS (5) Safari (1) Seagate (1) SOCIALES (6) TRUCOS (2) TUTORIALES (4) VIDEOS (6) VIRUS (1) win7 (2) win8 (1) winXP (3)

16 de marzo de 2011

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

No hay comentarios:

Publicar un comentario

Realiza tu comentario con respeto. Gracias.
o mándanos un correo a insjem2011@hotmail.com