acess a control in a MDI parrent form from a MDI child form

A

authorking

If there's a control in a MDI parrent form , how can I make it accessable in
a MDI child form?
Is there any sample code?
 
S

Sam Martin

use this.MdiParent to reference the parent MDI form.

from there you can use the Controls collection or methods such as
GetChildAtPoint().

Or you could cast it to the type of your parent form, i.e.

MyMdiForm myform = (MyMdiForm)this.MdiParent;

then you can access any public property/method of your mdi parent.

HTH
Sam
 

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

Similar Threads


Top