Picture
Values
You can display data from a text box control and have another control display it.
For example, you can have a label display what you insert in a textbox.
Here's an example.
  • Drag a Label, a Text box and a Button on to your form
  • Double click on the button control and you should notice this:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click  

End Sub

  • Inside the Button1_Click event type in the following code

Label1.Text = TextBox1.Text

  • The whole code should now look like this


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = TextBox1.Text
    End Sub


Go a head and run the program by pressing F5 on your keyboard or click the little green play button in the top menu.
Insert some data in to the text box and click the Button.
You will see what you type in the text box now displays in the label.
This could also be applied to other controls as well such as another text box etc.