Monday, August 20, 2012 12:57 PM
I have 3 forms lets say Form1, Form2 and Form3. Form1 is the MDIParent for Form2 and Form3 and I have already created the object of Form3 on the code behind code of Form1. Now I want to call one method of Form3 from Form2. How to do that, actually I don't want to create the object of Form3 again as it already exist.
Monday, August 20, 2012 1:18 PM
If this is a Windows Forms applicaiton then the way to access a method on another form is to create a reference to that other form at the time that you create it, and use that reference to access the method. In your case would pass that reference to Form3. For instance:
Dim frm2 As New Form2
Dim frm3 as New Form3(frm2)
and in Form 3
Dim frm2 as Form2
Public Sub New (thisForm2 as Form2)
frm2 = thisForm2
If this is not a Windows Forms application then a different procedure would be used.
- Marked As Answer by Shanks ZenMicrosoft Contingent Staff, Moderator Friday, August 31, 2012 7:39 AM