Understanding MDI forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AaronL
    New Member
    • Jan 2007
    • 99

    Understanding MDI forms

    Hello, I need some help understanding MDI forms.

    I want to get the contents of the active child MDI form, how do you do that? Here's what I did to create a child form.

    Code:
            childForm += 1
            If childForm > UBound(childForms) Then
                ReDim childForms(childForm)
            End If
            childForms(childForm) = New formHTML
            childForms(childForm).FormID = childForm
            childForms(childForm).MdiParent = Me
            childForms(childForm).Show()
    So say I want to get the text from an active form. How can I get the active form id so I can just do this?

    childforms(chil dform).textbox1 .text
  • Joseph Martell
    Recognized Expert New Member
    • Jan 2010
    • 198

    #2
    Usually, child forms do not have knowledge of each other, so you would have to find the active child form through the MDI parent.

    Assuming that this code appears in the MDI parent, you could access the active child this way:

    Code:
    Me.ActiveMdiChild
    It doesn't user your childforms array, but it achieves your stated goal.

    Comment

    Working...