I have 2 forms shown below.
Form1 has a button that opens Form2.
Form2 has a button that (I wish) puts text in a textbox on Form1
This is about as bare bones as it gets. No one I've talked to knows what to do. It appears that everytime you click the button on Form2 it creates another form. This can't be that difficult, I must be missing something simple. I can do this in VB6.
'==============
' FORM 1
'==============
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm2 As New Form2
frm2.ShowDialog()
End Sub
End Class
'==============
' FORM 2
'==============
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm1 As New Form1
frm1.TextBox1.Text = " TEST "
End Sub
End Class