Calling method in child form from MDI form?`

V

VM

How can I call a method in a child Form from within the parent MDI form? The
child form has a Save method but I'd also like to give the user the
opportunity to "save" from the MDI form also. They'd both run the same
method; the only difference is that one calls it from within the class that
draws the form while the other calls it from outside.

Thanks.
 
A

AlexS

Hi, VM

you have to keep reference to active child in main form. Then event handler
for main form command could find out, which child save method to call.

HTH
Alex
 
Y

Yasumitsu Tanaka

this is a code to close child forms from the parent MDI form.

foreach( Form f in this.MdiChildren )
{
f.Close();
}
 

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