Question Passing values into controls of other form

BahalaNa

New member
Joined
Sep 30, 2011
Messages
1
Programming Experience
Beginner
Hi all,

I have to ask a stupid question:

How to pass values from my form into the controls of other form?

I made textbox and button in my form1 and Label into the form2
When I click the button, I want to pass the values of the my textbox in the form1 into the labels of my form2

I am a student and totally new to vb.net
What should I write?
Thanks :)
 
Last edited:
This is a very, very common question and something you should be able to find the answer to from a quick forum search... try 'pass value form' in the search box - I just did and there were several hits that'll give you the answer.
 
A form is an object like any other. How do you normally pass data into an object? You either set a property or call a method and pass an argument. Forms are no different. It's up to you to define the property or method in the for you want to pass the data to. When you create the form instance, you set the property or call the method. Inside the property of method, you assign the data wherever it needs to go.
 
Back
Top