• We just launched and are currently in beta. Join us as we build and grow the community.

Hello World Application

AvaPaige

Content Creator
A Rep
0
0
0
Rep
0
A Vouches
0
0
0
Vouches
0
Posts
83
Likes
163
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Hello World Application

The first thing you need to do if you want to learn certain programming language like Visual Basic is to familiarize the IDE. The most popular source code that is being run is the "Hello World".

Any programming language has its own version of "Hello World" Application. To learn more about the list of Hello World Program, visit Wikipedia’s example.

In Visual Basic, there are several ways of showing the Hello World text. You can use a TextBox, a Windows Forms caption, a Console Application, and a lot more. Whatever it is, the important is you know how it works.

In this tutorial, we will use Windows Forms and a TextBox to show the Hello World Text.

Create a New Visual Basic Project

1. From the File menu, click New Project

media_1377230895990.png


This will open a new project dialog box as show below:

media_1377231052727.png


2. Select Visual Basic under the Project types and click Windows.

3. Select Windows Forms Application from the Templates.

4. Type the name of the project (e.g. Hello World).

5. Click OK.

You will now see one Windows Forms added to your Hello World project.

Add Control into Windows Forms

media_1377231339938.png


Drag TextBox control located under Common Controls to Form1.

Next we will set the Text property of the TextBox control.

Select TextBox control in Form1 and type "Hello World" in the properties window.

media_1377231530724.png


Now that you have already set the Hello World text, the next thing that you need to do is to save and run the application.

Saving the Project

1. From the File menu, click Save All.

media_1377231734774.png


2. Select the Location of the Project and click Save.

media_1377231842374.png


Running the Application

media_1377231956693.png


After you click the Run button, you will see the following output of your application.

media_1377232165132.png


Next thing to do is to build the application for production release.

Building the Application

media_1377232269983.png


You can now run the application without the Visual Basic editor on any Windows OS as long as it has the .NET framework installed.

You can copy the files under the Bin >> Release folder.

media_1377232431831.png


In my case, it is located under "D:\Websites\Sourcecodester.com\Tutorials\Hello World\Hello World\bin\Release".

Now you know how to create a Project, add a TextBox, change the Text properties of TextBox control, Save the project, Build the project and run the program.

All you need to do now is experiment on how to work with other controls like Label, CheckBox, ComboBox and a lot more.

Book traversal links for Hello World Application

  • ‹ Visual Basic Tutorial
  • Up
  • Variables ›

 

439,009

316,008

316,017

Top