S suresh Nov 18, 2003 #1 How can I set the MDI Parent property for a child form from that child form itself?
E EricJ Nov 18, 2003 #2 me.mdiparent = frmparent (but you will have to declare the frmparent as a public shared instance of your parent form) eric
me.mdiparent = frmparent (but you will have to declare the frmparent as a public shared instance of your parent form) eric
A Armin Zingler Nov 18, 2003 #3 suresh said: How can I set the MDI Parent property for a child form from that child form itself? Click to expand... ?? Maybe Me.MdiParent = TheParentForm ? But why do you need this?
suresh said: How can I set the MDI Parent property for a child form from that child form itself? Click to expand... ?? Maybe Me.MdiParent = TheParentForm ? But why do you need this?
H Herfried K. Wagner [MVP] Nov 18, 2003 #4 * "suresh said: How can I set the MDI Parent property for a child form from that child form itself? Click to expand... \\\ Me.MdiParent = <reference to MDI container> ///
* "suresh said: How can I set the MDI Parent property for a child form from that child form itself? Click to expand... \\\ Me.MdiParent = <reference to MDI container> ///
J Jay B. Harlow [MVP - Outlook] Nov 18, 2003 #5 suresh, In addition to the others, I will sometimes define a second constructor in the child form that accepts the parent, then use that to set it. Something like: Public Class ChildForm Inherits Form ' designer needs this, others do not Private Sub New() InitializeComponent() End Sub Public Sub New(parentForm As Form) MyClass.New() me.MdiParent = parentForm End Sub ... End Class Hope this helps Jay
suresh, In addition to the others, I will sometimes define a second constructor in the child form that accepts the parent, then use that to set it. Something like: Public Class ChildForm Inherits Form ' designer needs this, others do not Private Sub New() InitializeComponent() End Sub Public Sub New(parentForm As Form) MyClass.New() me.MdiParent = parentForm End Sub ... End Class Hope this helps Jay