You must have an *instance* of the form. Inside your FormB class, add
a variable of type FormA then overload the constructor of FormB to take
an instance of FormA. Similar to this (pseudocode):
'In FormB
Private MyFormAReference As FormA
Public Sub New(frm As FormA)
MyFormAReference = frm
End Sub
'In FormA somewhere, pass in a reference to Form A:
'Me refers to FormA
Dim MyFormB As New FormB(Me)
'Then later in FormB, you can close FormA like this:
MyFormAReference.Close
Hope this helps a little
Ask a Question
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.