Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic

Visual Basic .NET 2008 Express - A "From the Ground Up" Tutorial

Installing VB.NET 2008 Express and Writing a Program

By Dan Mabbutt, About.com

Aug 10 2008

Visual Basic Express is the main requirement for this course and you can get it free from Microsoft. Here's how to do it:

Go to ...

http://www.microsoft.com/express/download/default.aspx

... and click Download.

Note the hardware and software requirements. They're not kidding. This is heavy duty software and you have to be equipped to run it. Keep in mind that you're running exactly the same Framework 3.5 that the expensive versions of Visual Studio use.

Thanks to Francis Lotuaco for suggesting that I include the link for the hardware requirements (as well as a lot of other information that you might want to browse through) right here where it's convenient. To view the VB.NET 2008 Express "ReadMe" file, click here.

Also note that you really do have to completely uninstall any Beta versions before downloading and installing Visual Basic Express. Failure to uninstall the beta versions before installing the final version was a horrible problem back when Visual Basic Express was first introduced ... and it's very tough to solve. I had the most success installing with nothing else running. This install does seem to be sensitive to other applications running during the install.

Writing your first VB.NET Express program

For decades, programmers have used the program "Hello World" to launch a new language and I certainly want to uphold tradition.

This is literally true!

The tradition dates back to 1978 when Dennis Ritchie and Brian Kernighan published the landmark book, "The C Programming Language". The Hello World program even has it's own entry in Wikipedia. As Wikipedia notes, "A 'hello world' program can be a useful sanity test to make sure that a language's compiler, development environment, and run-time environment are correctly installed."

"Hello World" is simply a program that displays the phrase on a convenient output device. So, here's how to create "Hello World" using Visual Basic Express.

Start Visual Basic Express and select New Project from the File menu (or press Ctrl-N). Make sure the Windows Application template is selected. Change the name to HelloWorld (If you use the default name WindowsApplication1, you won't be able to remember what it is because all your projects will have a similar generic name!)

--------
Click Here to display the illustration
Click the Back button on your browser to return
--------

Visual Basic Express will create a complete starter Windows program, ready for you to add your code and objects. The initial screen looks like this:

--------
Click Here to display the illustration
Click the Back button on your browser to return
--------

Notice that the default name Form1 has also been used for your startup form. It's a good idea to rename all of your project controls before you do anything else. Visual Basic will create a lot of your system automatically. If you don't provide your own names, you'll have default names that you won't understand when you start programming.

The form name should be changed in two places. The File Properties for the Form1.vb file are shown in the illustration above so we'll change that first.

We'll discuss properties, controls and everything else in the next lessons. For now, just remember that every object can have unique values associated with it and these values are called properties. The first step in updating the properties for an object is to make sure that object is the one Visual Basic is currently referencing (this is called, "having the focus").

I changed the file name of the form to HelloForm.vb.

To change the form name, first click the form in the design window to display the properties window for the form. Now change the name of the form. (I used the name HelloWorld again.) And while you're at it, you might want to scroll down in the properties and change the Text property too. Notice that when you change the Text property, the form display in the design window is automatically updated with the new name. Here's an illustration after all of these properties have been changed.

--------
Click Here to display the illustration
Click the Back button on your browser to return
--------

On the next page, we add controls to our program and run it!

Explore Visual Basic

By Category

More from About.com

Visual Basic

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Visual Basic .NET 2008 Express - A "From the Ground Up" Tutorial

©2009 About.com, a part of The New York Times Company.

All rights reserved.