Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Entry form and Esc
Message
De
15/06/2005 10:15:27
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01023308
Message ID:
01023496
Vues:
13
We set a form property ischanged to .t. in the interactivechange event of every control on the form. Then in the queryunload we check for lastkey() = 27 and ischanged is .t. we ask the user if they want to abort his/her changes. When we save the data the form's ischanged property is changed to .f.
We also have a global var (could be an object property instead) that is set for every user that is safety = ON or OFF. If safety is ON for the user (our var is us_safety) then the user is prompted to abort when ischanged is .t. and the user presses escape or clicks on cancel. If us_safety is OFF for that user (maintained under user settings) then there is no prompt before aborting edits for that user. It is part of the user settings when users are setup in our app. Our app requires that each user logs in.


>Hi everybody,
>
>In MereMortals if I press ESC the form is released. If I was typing something in the textbox, then pressed ESC - the content of what I typed is deleted and the form is released without a question. I want a question asked "Do you want to save the changes?" and if yes, what I typed should be saved...
>
>How can I achieve this funcitonality?
>
>Thanks in advance.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform