Validation in MDI children

M

Mat Hess

Hello

In my MDI Application, I have an MDI Parent Form which contains two
Child Forms, childA and childB. childA has a TextBox which has an
Validating event Handler

When the Users enters some text into this TextBox which does not pass
the validating event, the Event Handler sets the Cancel Property of
the CancelEventArgs argument to TRUE. The Cursor cannot leave the
Texbox, which is excty what I want... but:

When the user clicks on another MDI Child (e.g. childB), childB comes
to front. The user can click on any Textbox on childB, he will not get
the cursor into the Textbox, because the Cursor is held back in
childA. The user thinks that the Application is not responding.

It would be a lot better if I could prevent the User from activating
childB as long as childA has Validation Errors.

How can I do this?

Regards
Matthias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top