Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Escaping from a MODAL form...how to trap this?
Message
 
À
22/01/2005 09:23:56
Scott Malinowski
Arizona Fox Software LLC
Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
00979573
Message ID:
00979582
Vues:
18
Scott,

As you have found out, placing code in the Cancel button itself is not the appropriate place. Place your code in the Cancel method of the form and then it will get executed either when pressing the Cancel button (if you have used the cmdCancelMaint button from kcustctl) or exiting the form from the Close (X) button, pressing Escape etc. The QueryUnload method is doing the AskToSave method and calling the SaveRecord or Cancel of the form based on the response.

HTH

-Dan

>Greetings!
>
>I have a cBizObjForm form that I made MODAL. I want to allow the user to minimize and maximize the form if they want. But, I don't want them to be able to ESCAPE out of the form. I have a command button set as the Cancel button that has code in it that MUST run if they exit the form without taking some other action.
>
>However, when I hit escape key, a window pops up asking me if I want to save my changes? I've tried putting ON ESCAPE commands, testing for LASTKEY() = 27, etc. into the form.Init, .Release, etc. Nothing seems to over-ride this ESCAPE mechanism????
>
>Anyone have any idea how this could be done in the framework?
>
>Thanks in advance!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform