Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is the escape controlling the form queryunload?
Message
From
02/12/2003 02:09:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
02/12/2003 01:20:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00854871
Message ID:
00854916
Views:
17
>>An ON ESCAPE handler? You sure there's no code anywhere in the form class hierarchy?
>
>I have been trying to find where this is coming from. I've searched for ON ESCAPE as well earlier on tonight. I was not able to find it.

I somehow think that this was once better documented in the help than it is now. It says that if ESC is pressed, a button with .cancel=.t. will receive a click event. Lastkey() will of course be 27.

What I can't find is that it should also work backwards, i.e. a mouse click on such button should also set lastkey() to return 27. I have too many things open at the moment to try this, but I seem to remember that testing for lastkey()=27 was sufficient if there was a cancel button on the form. If the test returned .t., the user initiated close form. Don't remember if QueryUnload was also affected with this, i.e. whether clicking the close box also set lastkey() to 27.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform