Variable show in two different forms

nl2ttl

Member
Joined
Nov 9, 2006
Messages
16
Programming Experience
Beginner
I have 2 forms, and i want to show the value of a variable from form1 to form2 how cani do this?
 
A form is a class like any other class. If you want to do something to it from outside you must add a public property or method to it, which the outside world then will access.
 
so you say, if i use a public sub
With a variable, i can use that variable in a other form?
Please correct met if i'm wrong.
 
If you add a public sub method to a classB then other classes can use it. If you define the signature of that method to use a paramter, then other class can pass a variable to this parameter and classB can just take the given parameter and use it as a local variable. You need to read your first VB book (!! :)), have a look in our Books section for possible reading suggestions.
 
Back
Top