Click to See Complete Forum and Search --> : Save Before quit


natraj
February 25th, 2000, 06:30 PM
I have developed my simple application. I the first form it has 10 text box controls and if the user has finished entering 5 controls and presses Alt+f4 the application quits. what should i do if the user click on save then the application should resume. any help !!!

Thanks for your time and knowledge
natraj@rediffmail.com

February 26th, 2000, 12:00 AM
I don't understand you exactly, but I think you mean how to ask user if he/she wants to save changes before exit?
You can do this by setting up one private variable as boolean and place this flag on whenever change even in textbox occure. It is good to have texboxes in your example in control array, this way you have to set this flag in only one place. Then on QueryUnloadForm event ( I think that's its name) you check this flag and if it is true ask user for saving and depending what the answer is you cancel exiting, save, of continue exit.