Visual Basic - ayuda con el boton esc

Life is soft - evento anual de software empresarial
 
Vista:

ayuda con el boton esc

Publicado por JOA (4 intervenciones) el 06/03/2006 17:39:48
HOLA ESPERO Q ME PUEDAN AYUDAR
NECESITO CERRA MI FORMULARIO CON EL BOTON ESC, REALIZO LA SGTE ACCION PERO NO ME RESPONDE

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

HAGO ESTO Y NADA , HABRA OTRA FORMA, POR SIACASO YA PUSE KEYPREVIEW=TRUE EN EL FORM LOAD
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:ayuda con el boton esc

Publicado por jose carlos (340 intervenciones) el 07/03/2006 15:03:02
pon un command buttom y le añades este código

Private Sub Command1_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
Unload Me
End If

ahora achica el formulario para que no se vea y cuando pulses escape funcionará

saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar