EL BOTON ESC EN VISUAL
    
		    HOLA Q TAL ES PERO Q ME PUEDA AYUDAR, TENGO, MI FORMULARIO Y NECESITO Q CUANDO PRESIONE ESC SE CIERRE LA VENTANA SE Q EL KEYCODE DEL ESC ES 27, LO Q HAGO ES LO SGTE:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 16 Then
If KeyCode = 27 Then
UNLOAD ME
End If
End If
End Sub
ESTO ES MI IDEA PERO NO FUNCIONA, NOSE SI HAY OTRA FORMA
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 16 Then
If KeyCode = 27 Then
UNLOAD ME
End If
End If
End Sub
ESTO ES MI IDEA PERO NO FUNCIONA, NOSE SI HAY OTRA FORMA
		    Primero, para que funciones el evento KeyPress de un form, la propiedad KeyPreview debe ser True.
Después colocas el condicional
If Keyascii = 27 then
Unload Me
end if
En un form, una vez que colocas un control, este Form ya no rebibe las pulsaciones de teclas, salvo claro, que el KeyPreview sea True
Saludos
    Después colocas el condicional
If Keyascii = 27 then
Unload Me
end if
En un form, una vez que colocas un control, este Form ya no rebibe las pulsaciones de teclas, salvo claro, que el KeyPreview sea True
Saludos
