1. Computing

Visual Basic .NET for Beginners Lesson 2

Lesson 2 of an About Visual Basic Tutorial

From , former About.com Guide

Updated July 04, 2009

This course is about programming using the Visual Basic language. It's written for complete beginners so I have tried to explain everything. If you're an experienced programmer, you'll probably discover that you already know a lot of what is in this course. But if you're completely new to programming, this course is what you're looking for.

The version of Visual Basic we'll use is called Visual Basic 2008 Express Edition and it is totally free and the course is totally free too. You can download all of the software you will need from Microsoft.

If you're looking for a more complete course that covers more advanced topics, I recommend the Visual Basic .NET 2008 Express - A "From the Ground Up" Tutorial.

Lesson Two Content

 Visual Basic .NET for Beginners
 Visual Studio in More Depth
    The Visual Studio GUI
       The windows and
         panes of Visual Studio
       Clicking with Visual Studio
    The Visual Studio Project Types
    Everything is an object
    Properties and the Design Window
    What's in a Windows Forms Application?
    The Form file and the Form object
    Project properties
    A Label that remembers your birthday 

If you're looking for the first Lesson to start at the beginning of this tutorial, click here: Lesson One.

Visual Studio in More Depth

Lesson 1 was a rapid fire introduction to VB.NET where we built a complete application that displayed a date on a calendar. It didn't involve actually writing very much code, but you had to use a lot of features of VB.NET and Visual Studio to get the job done. In this lesson, we're going to concentrate on explaining all about those features and more. But since programming is writing code, at the end of the lesson, we'll add a feature to the program from Lesson 1 to display a message on a particular date. You could use it to remember your birthday!

The Visual Studio GUI

GUI is Graphical User Interface. In the decades that I've been programming, acronyms have always been a big part of it so you might as well get used to using and knowing a lot of them. Often, there are several that can mean the same thing. For example, I could have written "Visual Studio IDE" for Integrated Development Environment. Both of these mean the windows and tools that are all in the bag called "Visual Studio .NET". We used a lot of them last time and we'll use more now.

As I noted last time, for our purposes here, Visual Studio .NET and Visual Basic .NET are really the same thing. The versions of Visual Studio that you have to buy include other languages in addition to Visual Basic. But Visual Basic .NET Express only supports Visual Basic. It is actually a remarkably complete version of Visual Studio, however. If you decide to buy a copy of Visual Studio, you'll find that the Visual Basic part of it is virtually identical.

The windows and panes of Visual Studio

Visual Studio is mainly a series of different windows that all work together. The main windows are:

  • The Design and Code windows
  • The Solution Explorer Window
  • The Properties Window
  • The Debug windows, Immediate and Output
  • The Toolbox window

You might find some sources that call these "panes" instead of "windows". We'll just call them "windows" here.

All of these windows except the Design and Code windows can be set in one of five different "operational modes":

  • Floating
  • Dockable
  • Tabbed Document
  • AutoHide
  • Hide

As you advance in your programming skills, you'll discover that Visual Studio offers much more. I still find tools in Visual Studio that I didn't know about.

The illustration below shows all of them as "Floating". You can click and drag them around the screen or close them. Right click on the title bar to change from one mode to another.

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

In the Floating mode, you can "dock" these windows against any side of the screen or even stack several on one side (where they become "tabbed documents" on that side). You might have had trouble with docking in earlier software (for example, the Windows Taskbar can be "docked" too) because it was so 'touchy' and hard to use. Visual Studio gives you an onscreen aid called "guide diamonds" that make it simple.

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

My advice is to stick to the startup defaults for now. But don't be concerned about experimenting to see what the different modes look like. You can always straighten out your experiments by selecting "Reset Window Layout" from the Window menu.

One final tip ... AutoHide can be a little confusing to beginners too. This makes the window collapse into the margin and pop out automatically when the mouse pointer hovers over the tab for the window in the margin. Beginners sometimes get into a "whack a mole" mode with these windows in AutoHide mode because they can't figure out how to keep the darn window visible while they select something in it. The solution is to either "pin" the window open (look for a pushpin in the title bar) or double click the tab in the margin. Either will keep the window open while you select something.

  1. About.com
  2. Computing
  3. Visual Basic
  4. Learn VB.NET
  5. Learn VS.NET
  6. Beginning Tutorial to Learn Visual Basic .NET - 2

©2013 About.com. All rights reserved.