You will have to pass a reference to the form to the 2nd form, for
example in a property. You can set this property before showing the
form.
Quick and Dirty:
In Form2:
\\\
..
..
..
Private m_MyForm1 As Form1
..
..
..
Public Property MyForm1() As Form1
Get
Return m_MyForm1
End Get
Set(ByVal Value As Form1)
m_MyForm1 = Value
End Set
End Property
..
..
..
///
Usage:
\\\
Dim f As New Form2()
f.MyForm1 = Me
f.Show()
///
In Form2:
Private m_MyForm1 As Form1
.
Public Property MyForm1() As Form1
Get
Return m_MyForm1
End Get
Set(ByVal Value As Form1)
m_MyForm1 = Value
End Set
End Property
.
Usage:
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.