Closing child forms in MDI parent one?

A

al

Greetings,

If I instansiate child forms in MDI parent, what is the way to close
them. I can't find an event related to child to do such task. I want
to close 3 child forms, all in the same parent.

MTIA,
Grawsha
 
A

Armin Zingler

al said:
If I instansiate child forms in MDI parent, what is the way to
close them. I can't find an event related to child to do such task.
I want to close 3 child forms, all in the same parent.

The MdiChildren property of the parent returns a list of all open Mdi child
windows. Each child has also a Close event you can handle.
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (al) scripsit:
If I instansiate child forms in MDI parent, what is the way to close
them. I can't find an event related to child to do such task. I want
to close 3 child forms, all in the same parent.

\\\
Me.MdiChildren(2).Close()
///
 
A

al

* (e-mail address removed) (al) scripsit:

\\\
Me.MdiChildren(2).Close()
///

This is not exactly what I want.It is what event/s I should use in the
MDIparent or any other to triger the closing of the child forms. That
is,

'What event I should use to trigger this event?
 
A

Armin Zingler

al said:
This is not exactly what I want.It is what event/s I should use in
the MDIparent or any other to triger the closing of the child forms.
That is,

'What event I should use to trigger this event?


"Each child has also a Close event you can handle."
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (al) scripsit:
This is not exactly what I want.It is what event/s I should use in the
MDIparent or any other to triger the closing of the child forms. That
is,

'What event I should use to trigger this event?

That's not an event, that's a method call. Call it where you want to
close the form, for example in a button's 'Click' event handler.
 
A

Armin Zingler

Armin Zingler said:
"Each child has also a Close event you can handle."

Excuse me please, it is the Closed event, not the Close event. Close is a
method.
 

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