Hello World

This is the famous universally recognised first stage of a tutorial used in every programming language from Java to C++ , Hello World! This tutorial will show you to do it in Visual Basic 2005 Express Edition.

www.cespage.com/vb/vbextut1.html

Step 1

Start Microsoft Visual Basic 2005 Express Edition, then select File then New Project... Choose Windows Application from the New Project Window, enter a name for the Project and then click OK, see below:

New Project

Step 2

A Blank Form named Form1 should then appear, see below:

Form1

Step 3

Then from the Windows Forms components tab select the Button control:

Button Component

Step 4

Draw a Button on the Form, see below:

Form1 with Button

Step 5

Then goto the Properties box and change the Text property from Button1 to Click Here, see below:

Button Properties

Step 6

Double Click on the Button Control and type in the Button1_Click Sub:

MsgBox("Hello World", MsgBoxStyle.Information, "Test")

See Below:

Button Click Event

Step 7

Save the Project as you have now finished the application, then click on Start:

Start

When you do the following will appear:

Application Running

Step 8

Now click where it says "Click Here" and a Message Box will appear looking something like this:

Message Box

Step 9

Just Click on OK and then click on the Close button Close on the top right of Form1 to end the application.

That was your first working Visual Basic 2005 Express Edition application, until the next installment of the Visual Basic Tutorial! Try changing the Text and Title of the Message Box or try changing the code and adding more parts, you can learn a lot from this simple application!