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

  • Thread starter Thread starter authorking
  • Start date Start date
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?
 
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
 
Back
Top