Hello ....

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:

Hello World Project

Step 2

Then from the Visual Basic Components Menu Select the Text Box Control:

Textbox Control

Step 3

Draw a Text Box on the Form, see below:

Form1 Textbox and Button

Step 4

Then go to the Properties box and change the Text property from Text1 to Hello World!, see below:

Properties

Step 5

Double Click on the Command Button and type in the Command1_Click() Sub:

MsgBox Text1.Text,vbInformation,"Test"

See below:

Command Button Clicked

Step 6

Save the Project (for example prjHello) into a vacant folder as you have finished the application. Click on Start / Run Start / Run or Press F5 and the below will appear:

Application Running

Step 7

Now Click on where it Says Click Here and a Message Box will appear, which will look something like this:

Hello World

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")

Copyright Comentsys © 1997 - 2009, All rights reserved. About | Contact | Link to Page
Valid XHTML 1.1! Valid CSS Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0 This website is ICRA rated