VB.NET: Transferring Data From Form to Form....[Resolved]
Does anyone have any idea how to transferring data from TextBox1 in form1 to textBox2 in form2.....
That means after i fill in any data in textBox1 and click Next button...
It will bring me to form2....and there the data that i key in form1 will appear to form2 in textbox2
Thanks
VB.NET: Transferring Data From Form to Form (Using the owner thing method)
for the string part...i solve it with:
Code:
Dim s As String
Dim f As New Form2
s = textBox1.Text
f.textBox2.Text = s 'passing text to form2
f.Show()
Me.Hide()
Now another problem is i am using the owner thing..
Which means in form1....
Code:
Private f As New form2
Dim s As String
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
s = cbo.SelectedItem
f.textBox2.Text = s 'passing text in the form2
f.Show()
Me.Hide()
End Sub
In form2.......
Code:
Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
Me.Owner.Show()
Me.Hide()
End Sub
Which means i cannot use the f.textbox2.text = s in form1.....the program will get hang there for quite long before getting the data there when i run...