1. Technology

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

Installing VB.NET 2010 Express and Writing a Program

By

System Requirements for VB.NET Express

Visual Basic Express is the main requirement for this course and you can get it free from Microsoft at the web link on the previous page.

Note the hardware and software requirements. They're not kidding. This is heavy duty software and you have to be equipped to run it. In addition to Windows XP or later, you need a machine at least this big:

  • 1.6 GHz or faster processor
  • 1024 MB RAM (1.5 GB if running on a virtual machine)
  • 3 GB of available hard-disk space
  • 5400 RPM hard-disk drive
  • DirectX 9-capable video card running at 1024 x 768 or higher display resolution
  • DVD-ROM drive

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.

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. If you need more help understanding how to start and use VB.NET, Part 4 of this series goes into greater detail. You can skip ahead and read it now if you like.

Start Visual Basic Express and select New Project from the File menu (or press Ctrl-N). Select the Windows Application template. Change the name to HelloWorld (If you use the default name WindowsApplication1 for your projects, you won't be able to remember what each project does. Always use meaningful names so you, or another programmer, can understand them later.)

--------
Click Here to display the illustration
--------

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

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 here, you'll have more default names that you won't understand later. So, to get started, change the file name of the form to HelloForm.vb.

--------
Click Here to display the illustration
--------

The values that are associated with an object are called "properties". For example, the initial form added by VB.NET was given the default name Form1. When you changed the file name to HelloForm, VB.NET changed the Name property to HelloForm at the same time to save you work and keep things synchronized. To check, click the form to select it and then scroll up in the Properties window until the Name property is visible. (The Properties window will normally be at the bottom right in VB.NET.) The file name of the form and the Name property don't have to be the same, but it's less confusing if they are the same. You'll find that VB.NET does a lot for you automatically.

We'll discuss properties, controls and other things in more detail in the next lessons. For now, just remember that every object will usually have a lot of unique values associated with it. Scan the other properties for the form to get a feeling for the kinds of values that are available.

While you're looking at the properties of the form, you might want to scroll down 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 title. Here's an illustration after all of these properties have been changed.

--------
Click Here to display the illustration
--------

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

  1. About.com
  2. Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Visual Basic .NET 2010 Express - A "From the Ground Up" Tutorial

©2014 About.com. All rights reserved.