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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Aug 21, 2008, 4:57 AM
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.