April 20th, 2011, 03:21 PM
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
Any other ways to do this.?
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.