Exactly the same way . The idea is to get reference of the form you want to change . Since Forms in .NET are classes and classes are passed byref we'll do it this way , through the constructor :
Steps :
in Form2 do this :
Override the constructor to take reference of Form1 :
VB Code:
Dim frm2 As Form Public Sub New(ByVal frm1 As Form) InitializeComponent() Me.frm2 = frm1 End Sub
Then ,
in a button on Form 2 , paste this code :
VB Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.frm2.Text = "Changed from Form2" End Sub
Third , Go to Form1 and change the code to this :
VB Code:
Dim f2 As New Form2(Me) f2.Show()
Run , test , Working ....![]()
If you got stuck just shout and we'll be around .![]()





Reply With Quote