By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,554 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

Understanding MDI forms

P: 99
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.

Expand|Select|Wrap|Line Numbers
  1.         childForm += 1
  2.         If childForm > UBound(childForms) Then
  3.             ReDim childForms(childForm)
  4.         End If
  5.         childForms(childForm) = New formHTML
  6.         childForms(childForm).FormID = childForm
  7.         childForms(childForm).MdiParent = Me
  8.         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?

Jul 20 '10 #1
Share this Question
Share on Google+
1 Reply

Joseph Martell
Expert 100+
P: 196
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:

Expand|Select|Wrap|Line Numbers
  1. Me.ActiveMdiChild
It doesn't user your childforms array, but it achieves your stated goal.
Jul 23 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.