Please Follow all the Steps of Hello World before starting this Tutorial or use the Source Code provided and adapt as needed.
Printer Friendly Download Tutorial (21.8KB) Download Source Code (7KB)
Step 1
Load Microsoft Visual Basic and then Click Open, Open the VB Project File for the First Tutorial and the folowing will appear:
Step 2
Then from the Visual Basic Components Menu Select the Text Box Control:
Step 3
Draw a Text Box on the Form, see below:
Step 4
Then go to the Properties box and change the Text property from Text1 to Hello World!, see below:
Step 5
Double Click on the Command Button and type in the Command1_Click() Sub:
MsgBox Text1.Text,vbInformation,"Test"
See below:
Step 6
Save the Project (for example prjHello) into a vacant folder as you have finished the application. Click on Start / Run or Press F5 and the below will appear:
Step 7
Now Click on where it Says Click Here and a Message Box will appear, which will look something like this:
Step 8
Just Click Ok and enter anything you want into the Text Box that is made up of Letters or Numbers and then Click on the Command Button. The Message Box Creates the Text from the Text Box, try it for yourself! Try changing some of the variables, such as seeing if you can get it to display input from two Text Boxes (Clue:Use somthing like: MsgBox Text1.Text & Text2.Text, vbInformation, "Two Text Boxes")