I just did this:
If TypeOf Me.ActiveMdiChild Is AccountForm Then
Dim ChildForm As AccountForm = CType(Me.ActiveMdiChild, AccountForm)
I don’t quite understand the question. MDIChildren are of usually one type (say “MyDerivedForm” or “Form2″ or whatever. Then you can certainly do stuff like:
Dim fm as MyDerivedForm = Me.ActiveMDIChild
If fm Is Nothing
MsgBox(“No Active Children”,0,”")
dim i as integer = fm.Foo()
or call up a child button using fm.SaveButtonCick(sender,e) assuming not private
or call up a MenuStrip item, if you have not merged it, as, for example fm.SaveToolStripMenuItem.PerformClick()
and so on.
All easy stuff but your question seems to imply different TYPES in the way you talk about “Form1″, “Form2″ etc.
Perhaps I need more clarification.