Results 1 to 3 of 3

Thread: Child of an MDI Child

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184

    Child of an MDI Child

    I have an MDI app which opens various Child forms. I want to drill down from these child forms and open other Child forms, but how do I ensure these are still childred on the MDI container?

    The following code is on a button in a Child form and the form opens but not as a child in the MDI?

    Should I somehow call a procedure from my Child form into the MDI and let the MDI "manage" the new sub-child? How best to do this?

    Code:
        Friend FormDetail As frmDetail
    
     Private Sub cmdDetail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdDetail.Click
            ' 
            ' Show the details Screen.
    
            If FormDetail Is Nothing Then
                ' A new Detail Form is Required.
                FormDetail = New frmDetail(thisUser, mstrStartDate)
                FormDetail.StartPosition = FormStartPosition.CenterParent
                'Display the new form.
                FormDetail.Show()
            End If
            '
        End Sub
    
    This opens a form but not as a child of the MDI.

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    You haven't specified it as a MDI child. Just because you open a form from code that happens to be sittin in a MDI child, doesn't mean that form is part of the MDI container.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184

    *** Resolved ***

    oops, you are dead right. I can use the Parent property of the curent child form to make my new form another child - a sibling ;-)

    Thanks.

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