The ParentForm property gets the parent of a MDI child.
A way for you migth be to keep a reference. You could do that by creating your own Sub New for your FormB where you pass a reference to the Form as an argument.
Code:
#Region " Windows Form Designer generated code "
Dim mainForm As FormA
Public Sub New(ByVal mForm)
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
mainForm = mForm
End Sub
You then use something like this from FormA:
Code:
Dim frm As New FormB(Me)
frm.Show()
You then have a reference to the Form via the mainForm variable.
/Leyan