Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
formlesstree4

Formlesstree4's Visual Basic .NET 2008 Tutorial 1

Recommended Posts

Welcome to the first Visual Basic .NET 2008 Tutorial!

 

First off, You need to get the IDE (Integrated Development Editor) to be able to Code and Compile your program.

 

Open your Web Browser and browse to http://www.microsoft.com/express/vb/Default.aspx (Or click here)

 

43567595.th.png

 

On the page, you need to look for a little area that's shown here:

 

12190305.th.png

 

Download this file, and run it. Click Yes/Ok on anything that pops up. You'll want to leave the PC for a bit because this takes a long time to get. You might have to restart, it depends actually.

 

 

Proceed when you're done.

 

Now that You have the actual IDE, let's look on the inside.

 

99532866.th.png

 

This is the IDE for Visual Basic .NET 2008 (Though mine says Visual Studio, there's hardly any difference.)

 

Go up to File and hit New Project (Or Press Ctrl + N) and the following dialog should show up:

 

78030750.th.png

 

In the upper left hand corner, there's a drop down box with three framework versions. Select the 2.0 Framework.

Next, you see the name "WindowsApplication1". Change that to: "MessageBox Tutorial" and press OK.

 

Your IDE should change to look something like this:

 

77943184.th.png

 

On the left hand side of the screen are a list of Controls. These controls allow us to modify the form and other properties of the program.

 

Locate the Button Control, select it, and click on the form. If everything worked right, your form should look like this:

 

73345331.th.png

 

Double Click the newly created Button. Your screen should have transformed into something new:

 

80788395.th.png

 

 

Hopefully, your cursor is inside the Sub labeled "Button1_Click"

Inside this Sub, type in the following:

Messagebox.show("Hello World!")

 

97397354.th.png

 

This code is very simple. What it's telling Visual Basic .NET is to display a small MessageBox with the text "Hello World" inside of it!

 

Do you see that little Green Arrow? That's our debugging arrow. If you click that, Visual Basic .NET will run the program directly in the IDE, so you can make sure everything works correctly!

 

30151367.th.png

 

Go ahead and press that. If everything worked correctly, this is what you should see:

 

67178984.th.png

 

Since the form loaded, there were no errors. Go ahead and click the button on the form. If it works, this should pop up:

 

63887337.png

 

There you go! That's your first very simple Hello World program in Visual Basic .NET!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...