I have a form with a text control on it.
I am handling the Validating event in C#.
If I tab or click on another control, my validating code is called ok.
I also understood that if the form was closed, the validating event was fired and my validating code would be called.
However, this is not happening and if i enter some text into the control and click the forms X to close it, the validating event does not seem to be fired.
Have I misunderstood this or do I need to do something to make this happen
Thanks
Steve
Edit:
Update
I am displaying the form using myform.ShowDialog();
If I test this with Application.Run(new myform()) , it works but in this case the form is not my main form so i dont want this.