Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execute code before closing form
Message
De
29/03/2007 04:13:09
Hans-Otto Lochmann
Dr. Lochmann Consulting Gmbh
Frankfurt, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01209324
Message ID:
01209584
Vues:
30
>Hans,
>
>Thanks for your kind words. I wish you send them to Eric Den Doop <g>
>
>I actually updated my initial reply to make it more moderate and removed mentioning of repugnant from it (BTW, I didn't know the word initially too when was first called it). I have, unfortunately, a tendency to reply immediatelly after I see or feel something and often later regret the first impulse... In most cases the actions are not retroactive and no matter how sorry I may be later I can not do anything about them.
>
>Anyway, in the MereMortals framework I was using and in my current framework I have a question asked before closing the form if changes were made "Do you want to save changes? Yes/No/Cancel" I don't have a question "Are you sure you want to exit the form? May be you just pressed the close button accidentally?" <g>
>

Hi Naomi,

Good morning!

Thanks for you reply - by the way - I have the same habit, sometimes I answer before thinking about what I've heard or read. Do you know the proverb: "Take a good nights rest before you finally make an important decision"?

As far as my code examples are concerned - they should serve as a testbed in order to find out, which behavior you finally want to have. In my second version for instance, if the keyboard is used to close the form, the OnClose method in invoked twice: If this code is run, the Exit button has focus. When you then hit the enter key for the Exit- and OK-buttons and "Y" for the Yes-Buttons, the the sequence of the methods / events would be Init - Keypress - Release - Onclose - Release - Onclose - Unload (no QueryUnload). Of course, nobody wants that, so use this testbed to find how to get the desired behavior.

Or use a framework, where someone else did that already (hopefully).

Hans
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform