jdy0803
Well-known member
There' a form(formA) which calls another form(formB).
formA calls formB like this.
Using frm As New formB
frm.ShowDialog(Me)
End Using
In formB, refer to formA's control like this.
CType(Me.Owner, formA).Text1.Text = "AAA"
How do I refer formA's public variable or public function?
Should I use CType(Me.Owner, formA) like control?
CType(Me.Owner, formA).myVar = 1
ret = CType(Me.Owner, formA).myFunc()
or just do like this?
formA.myVar = 1
ret = formA.myFunc()
formA calls formB like this.
Using frm As New formB
frm.ShowDialog(Me)
End Using
In formB, refer to formA's control like this.
CType(Me.Owner, formA).Text1.Text = "AAA"
How do I refer formA's public variable or public function?
Should I use CType(Me.Owner, formA) like control?
CType(Me.Owner, formA).myVar = 1
ret = CType(Me.Owner, formA).myFunc()
or just do like this?
formA.myVar = 1
ret = formA.myFunc()