P
pa.singer
Developing a windows application with VB.Net under VS 2005. I am
wondering if anyone knows how I can prevent validation events from
firing if the user clicks on the control box close button to exit a
form. I do not want to set the CausesValidation property on all of the
form controls to False as I do want validation events to fire if the
user is tabbing from control to control. However, the control box
close button presents an apparently ugly issue because, when clicked,
not only does the validation event for the control being exited fire
but the FormClosing event still fires even if the validation event
fails and the program issues a Cancel. Has anyone else run across this
problem and found an elegant solution?
Thank you...
wondering if anyone knows how I can prevent validation events from
firing if the user clicks on the control box close button to exit a
form. I do not want to set the CausesValidation property on all of the
form controls to False as I do want validation events to fire if the
user is tabbing from control to control. However, the control box
close button presents an apparently ugly issue because, when clicked,
not only does the validation event for the control being exited fire
but the FormClosing event still fires even if the validation event
fails and the program issues a Cancel. Has anyone else run across this
problem and found an elegant solution?
Thank you...