Setting Textbox text on another form

nd54

Member
Joined
May 2, 2003
Messages
8
Location
CA
hello all I am trying to set a textbox text so when I click a button it sets the text on that form into the textbox on another form
here is what I got
Code:
dim F3 as new form3
f3.textbox1.text = textbox1.text

when I click the button it doesnt add the textbox to the form3 textbox what am i doing wrong
 
in form3 textbox one needs to be declared as public. Or preferably ad a property procedure to form3 for access to the textbox contents.
 
The easiest and probably the best way would be to pass your forms instance in a constructor. Then you can manipulate the form and its controls.
 
Back
Top