Ho aperto un progetto di prova solo per fare queste prove sono riuscito a trovare la soluzione cosi:
nel 1° form (padre)
codice:
If ClasseForm2.CustomerForm Is Nothing Then
Dim frm2Child As New Form2()
frm2Child.MdiParent = Me
frm2Child.Show()
ClasseForm2.CustomerForm = frm2Child
Else
ClasseForm2.CustomerForm.Show()
End If
nel 2° form (child)
codice:
If ClasseForm3.CustomerForm Is Nothing Then
Dim frm3Child As New Form3()
frm3Child.MdiParent = Me.ParentForm
frm3Child.Show()
ClasseForm3.CustomerForm = frm3Child
Else
ClasseForm3.CustomerForm.Show()
End If
Modulo:
codice:
Public Class ClasseForm2
Private Shared m_CustomerForm As Form2
Public Shared Property CustomerForm() As Form2
Get
Return m_CustomerForm
End Get
Set(ByVal Value As Form2)
m_CustomerForm = Value
End Set
End Property
End Class
Public Class ClasseForm3
Private Shared m_CustomerForm As Form3
Public Shared Property CustomerForm() As Form3
Get
Return m_CustomerForm
End Get
Set(ByVal Value As Form3)
m_CustomerForm = Value
End Set
End Property
End Class