Results 1 to 3 of 3

Thread: New to MDi Forms

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2009
    Posts
    2

    New to MDi Forms

    I am very new to VB 2008 and MDi forms. I have found code that puts one child forminto a parent form. How do you had multipule child forms into the parent. Below is the code that I found:

    Dim MDIChildForm As New Form2()
    MDIChildForm.MdiParent = Me
    MDIChildForm.Show()

    Thanks
    Kieth

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: New to MDi Forms

    You simply do the same thing multiple times.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Re: New to MDi Forms

    Quote Originally Posted by kieth View Post
    I am very new to VB 2008 and MDi forms. I have found code that puts one child forminto a parent form. How do you had multipule child forms into the parent. Below is the code that I found:

    Dim MDIChildForm As New Form2()
    MDIChildForm.MdiParent = Me
    MDIChildForm.Show()

    Thanks
    Kieth
    Hi Kieth:
    Code:
     Dim MDIChildForm As New Form2()
    references an instance of a form (MDIChildForm) and the name of the form (Form2)

    Each child form you have will have a different name in the IDE; therefore, each instance will have a different name that you would assign to the form and a different reference to the form. If you have a form called frmLogon, Form2 would be replaced with frmLogon, etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width