TextBox

  • Thread starter Thread starter Bill English
  • Start date Start date
Look at your past post about a About dialog box. Use the same idea to
get a reference of form1 in form2. Then you can use <form>.Textbox1.Text
to get or set the text.

' In form2
Dim _frm As Form1

Public Sub New(ByVal frm As Form1)
MyBase.New()

_frm = frm

End Sub

'-- Test it in form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Debug.WriteLine(_frm.TextBox1.Text())

End Sub
 
Well I just typed something wrong, but Whidbey makes all
of this so much easier... no need to declare other forms,
hehehe.
 
Back
Top