question about multiple forms

araatn

New member
Joined
Nov 4, 2009
Messages
1
Programming Experience
1-3
hey,

how can u pass your array to another form

like example

FORM2
public test(2) as string
test(0) = "test1"
test(1) = "test2"
test(2) = "test3"


FORM 1
txtTest.text = ................



how can i get the value from the array test(0) in form 2 to in my textbox in form 1?????
thx who wants to help me :)
 
Last edited:
' From form one or wherever you want it to be
form2.txttest.text = test(0) & test(1) & test(2)

thats the basic idea. Or the last option would be adding a module and using a public variable from the module.
 
Deathly's general idea will work, assuming that it's the default instance of Form2 that you displayed in the first place, but the actual code would be:
VB.NET:
myTextBox.Text = Form2.test(0) & Form2.test(1) & Form2.test(2)
 
Back
Top