hello friends,
i have to close the form and that closing x should behave as cancel.
when i click on x it should perform cancel operations.it must not process any records.
can u help me.
hello friends,
i have to close the form and that closing x should behave as cancel.
when i click on x it should perform cancel operations.it must not process any records.
can u help me.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
AlanRank #669 · 3.6K reputationPosted Aug 21, 2008, 12:57 AM EDT
Just handle the form's FormClosing event and put whatever code you need to execute in the handler:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.formclosing.aspx
As you'll see from this link, you can even prevent the form from being closed using this event if that would be useful in your particular application.