Input and Output Text in VB.NET – Writing input and output text programs is very interesting topic for beginners. This is a basic input and output program and it explains how you would go about it. user can input text in the text box and the output will display in the module box. This program we developed in vb.net 2012.
In the below screenshot label, Text box and button added. It has single form and its renamed to frminputoutput. The name of the label is lblvalue and Text property is Value. The name of the text box is txtvalue. Button name is btndisplay.
Text: Display Record
To enter the value we used text box. It allows to enter the text in the text box. There is only one option to enter text in vb.net that is text box. To display the output we used messagebox function. It displays module box which contains text in the output. In the earlier Visual basic 6.0 version we were using msgbox function to display the output in module box, But in the latest version we were using advanced messagebox function. Because it has some extra features.
Here is the source code of this program:-
The form name renamed to frminputoutput. It has single line code in the btndisplay click event. In the message box it displays the value of txtvalue.
Public Class frminputoutput Private Sub btndisplay_Click(sender As Object, e As EventArgs) Handles btndisplay.Click MessageBox.Show(txtvalue.Text) End Sub End Class
Download Source code: This source code works well in latest visual studio 2012.
Video Tutorial: This video tutorial explains how to create this program.
I hope this lesson is very usefull to all beginners. If any doubts kindly post your queries in the comment box.🔥231 Views