Hello All,
I was wondering if you can help me with the following scenario:
- I have a MDI application, with the child forms opening / staying within the main parent form
- Open 2 child forms by opening a first child for (say ChildForm-A), then open another child form (say ChildForm-B)
- Now I'm filling data and processing stuff on ChildForm-B.
- Assume that some of the Data are invalid (they fail validation some how)
- Now try to switch forms leaving ChildForm-B and going to ChildForm-A
- The event "MdiChildActivate" is fired and I get to the event handler on the parent control.
- Once this event is fired, the "Leave" event is fired on ChildForm-B, and the validation kicks in.
- Only then I know that the Form is invalid, and I want to stay on it (ChildForm-B), however by now I'm already on the other form, since "MdiChildActivate" has been fired.
- Now, the only way I can stay on the invalid form, is to set it back as the active child
- Is there a way to prevent leaving the invalid form if I'm trying to switch between 2 MDI child forms without going to form A then manually set back the active child to form B
- Thank you in advance for all your help.