Windows MDI Forms and MDI Children Forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tmf123
    New Member
    • Nov 2006
    • 2

    Windows MDI Forms and MDI Children Forms

    Hello,

    I am taking a stab at creating a Windows form and need to create several children forms to this application as well. I come from the .net web development arena but have never created a WinForm based application before.

    My understanding is that I need to create an MDI application with MDI children associated with it. I have created the MDIParent form with all of the associated toolbars and status bars and a layout control.

    I just created a second form that I need to act as a child to the MDIParent. Immdiately I could not find out how to attach this to the MDIParent. Further research on Microsoft is giving me the impression that I should have created a form that inherits from the MDIParent.

    Is this the correct approach?

    I really just want to have new children open up based on what is selected in my menu system.

    Any comments would be greatly appreciated.

    Sincerely,

    Tim
  • bplacker
    New Member
    • Sep 2006
    • 121

    #2
    Once you have a form created which has the MdiParent property = true, here is what you need to do in order to open up a form as an Mdi child:

    dim childForm as frmName 'where frmName is the form you want to open
    childForm.MdiPa rent = Me '(or whichever form is the MdiParent)
    childForm.show( )

    Comment

    • tmf123
      New Member
      • Nov 2006
      • 2

      #3
      bplacker,

      Thanks for your time in replying.

      I'm really surprised that with all the advancements that Microsoft made with VS2005 that they didn't come up with a way you could accomplish this through the GUI. This should be something you could accomplosh through the properties panel or by right clicking on the form itself.

      Thanks again.

      Tim

      Comment

      Working...