I have this on my KeyPress event *-- Allow the form to be released when user hits Escape, if *-- lReleaseOnEsc is .T. LPARAMETERS nKeyCode, nShiftAltCtrl IF This.lReleaseOnEsc AND (nKeyCode = 27) IF This.QueryUnload() This.Release() ENDIF ENDIF RETURN
> I am making a small Form, for the entry of just a couple of items of > data, but, I want to allow the user to ESCape from the Form by hitting > the <ESC> key. I tried using the following command: > ON KEY LABEL ESC DO Thisform.Unload.Unload() > > But - VFP Yells at me that I can't use "Thisform" Except from > within a > Method. > > So - I'm a little lost. I even just tried to Set ESCAPE ON - and hoping > that would work, but, of course - no go... > > Any suggestions? I just figured this should be something simple - and I > MUST be missing a simple answer! > > TIA, > -K- > > _______________________________________________ > Post Messages to: [email protected] > Subscription Maintenance: http://leafe.com/mailman/listinfo/profox > OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech > Searchable Archive: http://leafe.com/archives/search/profox > This message: > http://leafe.com/archives/byMID/profox/289ea162f5642645b5cf64d624c66a1409df2...@us-ny-mail-002.waitex.net > ** All postings, unless explicitly stated otherwise, are the opinions of the > author, and do not constitute legal or medical advice. This statement is > added > to the messages for those lawyers who are too stupid to see the obvious. > _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

