passing data to another form

Joined
Apr 6, 2005
Messages
6
Programming Experience
Beginner
hi i am aving two problems.
1) i am trying to store an integer in a textbox so that it can be used again

VB.NET:
score = textbox1.text + 1

textbox2 = score

2)How can i pass the above integer to other forms.
i.e the score is an update of a calculation so if a user scores 1 point in 1 test and in the second form does another test ansd scores 3points and the final form will calculate the users total points by adding .

help
 
the formal way to that is by using a property or you could do some monkey coding.
try this one.
VB.NET:
'monkey coding
dim score as integer
score=textbox1.text + 1
textbox2.text=score
'assuming you have textbox in your form2 named textbox1.
dim f as new form2()
f.textbox1.text=me.textbox2.text
f.showdialog()
 
Back
Top