Results 1 to 4 of 4

Thread: Problem reloading MDI child form in main form.

  1. #1
    Join Date
    Jan 2008
    Posts
    56

    Problem reloading MDI child form in main form.

    Hi,
    VB.net problem
    First time the MDi child form loads good.
    Initial MDI Child form loads fine.
    exp.

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

    ----

    MDI Child unloads just fine.
    Exp.
    If e.Button Is tbbExit Then
    '' Me.Close()
    Me.Hide()

    rs.Close()
    cn.Close()

    End If

    ---

    The MDI Child reload does not reload into the parent form.
    It reloads outside the parent form.
    exp.

    Dim oForm As New Form2()
    oForm.MdiParent = Me.ActiveMdiChild
    oForm.Show()

    Regards

  2. #2
    Join Date
    May 2008
    Posts
    63

    Re: Problem reloading MDI child form in main form.

    Int he first part which works you have
    objChild2.MdiParent = Me
    In the second part, which doesn't work, you have
    oForm.MdiParent = Me.ActiveMdiChild

    Don't try to set MdiParent to Me.ActiveMdiChild.

  3. #3
    Join Date
    Jan 2008
    Posts
    56

    Re: Problem reloading MDI child form in main form.

    VB.Net User
    Answer from Microsoft:
    Dim oForm As New Form2()
    oForm.MdiParent = Me.ParentForm
    oForm.Show()

  4. #4
    Join Date
    Aug 2008
    Posts
    40

    Re: Problem reloading MDI child form in main form.

    I am bigginer of VB.NET.Can u help me how I can create child form of MDIparent form?

Similar Threads

  1. Replies: 5
    Last Post: 25-05-2011, 10:21 PM
  2. Replies: 2
    Last Post: 02-05-2011, 07:06 AM
  3. How to Auto Populate fields from sub form to form?
    By mich43 in forum Windows Software
    Replies: 6
    Last Post: 09-11-2010, 11:29 PM
  4. VB 2008 - MDI child forms - How do I set a form as a MDI child form
    By emaduddeen in forum Software Development
    Replies: 2
    Last Post: 27-04-2010, 04:22 PM
  5. Procedure in VB to create form inside another form
    By Jalabala in forum Software Development
    Replies: 3
    Last Post: 16-11-2009, 02:14 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,990,488.20649 seconds with 17 queries