It should unless something else intersepts ESC key and releases the form. Fire Debugger to see if Kepress of the form is even called.
>
>I pasted your following codes on keypress event of form
>
>DO CASE
>CASE nKeyCode = 27 AND thisform.pageframe1.visible
> thisform.pageframe1.visible = .F.
>CASE nKeyCode = 27 AND NOT thisform.pageframe1.visible
> Thisform.Release()
>ENDCASE
>
>
>But in the both cases it release the FORM1. First case still does not work.
>Please help again
--sb--