i want to set a property that when the user clicks on X button in the title bar it check for some condition if all conditions are true then exit if no then do nothing and return to the form ..
but i noticed that FormClosing property exit the application howevere are my conditions … so how to do my scenario ?!?
i’m using visual studio 2005 – C#
If you have already created the handler for the FormClosing event, just set the
FormClosingEventArgs.Cancelproperty to True to cancel the closure of the form.