-
April 20th, 2011, 03:21 PM
#1
Esc Key Event on VB 6 Form
I have a form with a frame. i want to close form with Esc Key and i m doing this. But when frame is visible then it should hide frame but its closing form. Is there any way to hide frame when frame is visible with Esc Key and close form when frame is hidden.
i am using this.
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyEscape Then
If frm1.Visible = True Then
frm1.Visible = False
Else
Unload Me
End If
End If
End Sub
Any other ways to do this.?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|