Thanks!  That worked!

 
----- Original Message -----
From: Richard Kaye <rk...@artfact.com>
To: "profox@leafe.com" <profox@leafe.com>
Cc: 
Sent: Wednesday, December 7, 2011 6:18 PM
Subject: RE: trapping escape key

Is the main screen a "form"? If so, you can trap the ESC keystroke in the 
keypress method and put in a NODEFAULT. 

if nKeyCode=27
    nodefault
endif

You'll need to make sure the form KeyPreview property is set .t.

--
rk

-----Original Message-----
From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On 
Behalf Of Michael Madigan
Sent: Wednesday, December 07, 2011 6:07 PM
To: profoxt...@leafe.com
Subject: trapping escape key

After I've converted foxpro 2.5 to vfp 9.0 some of the behavior isn't the same.
 
I need to prevent the users from hitting ESC at the main screen.  Right now it 
blanks out the screen and doesn't find the error handler for some reason and 
crashes.    I've tried adding "Set Escape off" and "on escape" with no command 
to no avail in various different methods of the page frame and page forms.   
 
What methods should I place "Set Escape off" into?   
 
Is this the correct way to do this other than this? 


_______________________________________________
Post Messages to: ProFox@leafe.com
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/DF1EEF11E586A64FB54A97F22A8BD0441D4A3539B4@ACKBWDDQH1.artfact.local
** 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: ProFox@leafe.com
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/1323302525.59332.yahoomail...@web125602.mail.ne1.yahoo.com
** 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.

Reply via email to