[RESOLVED]the form unload event
ok here is my situation:
I have "FORM1"
there is a button on form1 that opens up form2
user can do something on form2, but when they click the x button in the corner of form2....form2 just closes.
I want to make it show a dialog like "Are you sure you want to discard changes..." YES button and CANCEL button.
the question is where do I put the code? in the form2.close event? cause i tried it, but it shows the dialog but the form still closes.
please help
ok here is my situation:
I have "FORM1"
there is a button on form1 that opens up form2
user can do something on form2, but when they click the x button in the corner of form2....form2 just closes.
I want to make it show a dialog like "Are you sure you want to discard changes..." YES button and CANCEL button.
the question is where do I put the code? in the form2.close event? cause i tried it, but it shows the dialog but the form still closes.
please help
Last edited: