Close button on a form

sjn78

Junior Contributor
Joined
May 4, 2003
Messages
255
Location
Australia
I have got an options form where I keep track of any changes.

If the user clicks the X on the form, I display the dialog to save changes with YES|NO|Cancel

With YES and NO, I will want the form to close after it goes through its routine, but if someone clicks cancel, how to I keep the form open.

I have the code to display the dialog in the forms closing event.

I just need to know, when someone clicks cancel, how to tell it not to actually close the form.

Thanks

Steve
 
wait im trying to remmeber if it its true
u explore its only a trial error to times

on the form closing event

if the user sets yes then

u do


if msgbox = yes then


e.cancel = true


else


e.cancel = false



if it doesnt work then

swap the boolean values around i forgot which one makes wat sumfing hehehe


e.cancel just disables the default behaviour of that close button on the form
which hence the default behaviour is exit the app

so therefore if u want the app still running u gotta set the disable the default value


but i 4got if its = true or = false
so just explore for that ok?
 
Back
Top