|
-
Apr 7th, 2003, 08:05 PM
#1
Thread Starter
Frenzied Member
Text and Different Forms
I have a text box (textbox1) on Form2. I would like the text in textbox1 to display in label1 on Form3, but in VB.net i have no idea how to make it to that. In VB6 all i had to do in Form3 is type:
Private Sub Form_Load()
Label1.Caption = Form2.TextBox1.Text
End Sub
How can I do that in VB.net?
-
Apr 8th, 2003, 01:55 PM
#2
Sleep mode
Try this in form2
VB Code:
Dim frm3 as new form3
Private Sub Form_Load()
Form3.TextBox1.Text =Label1.Text
End Sub
-
Apr 8th, 2003, 03:58 PM
#3
Fanatic Member
I think that would look for Label1 on the same form though. You might be able to do something with MDI, where the parent actually sets the values. Or - if you have a class that invokes all of these forms, you can have this class do the work - as it hosts the form objects and has access to their control collections.
In theory at least.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|