An Overview of the Visual Basic Express Tool
This topic provides an overview of Visual Basic Express Edition, a program for creating applications using the Visual Basic language. Just as a program like Microsoft Outlook provides a variety of tools for working with e-mail, Visual Basic Express Edition is a toolkit for accomplishing a wide variety of programming tasks.
If you are new to programming, you may want to complete the Visual Basic Guided Tour, a set of lessons designed to teach you the basics, and then return to this topic. To start the tour, see.
The Development Process
Visual Basic Express Edition makes the process of developing an application easy—in most cases, the process consists of the following steps:
Create a project. A project contains all of the files necessary for your application, and it stores information about your application. Sometimes an application will contain more than one project, for example, a Windows Application project and one or more Class Library projects.Such an application is called a solution, which is just another name for a group of projects.
Design the user interface. You do this by dragging various controls, such as button and text boxes, onto a design surface known as a form. You can then set properties that define the appearance and behavior of the form and its controls.
For applications that have no user interface, such as class libraries or console applications, this step is not necessary.
Write the code. Next you will need to write the Visual Basic code that defines how your application will behave and how it will interact with the user. Visual Basic Express Edition makes it easy to write code with features like Intellisense, auto-completion, and code snippets.
Test the code. You will always want to test your application to make sure that it behaves the way that you expect it to—this process is known as debugging. Visual Basic Express Edition has debugging tools that make it easy to find and fix errors in your code interactively.
Distribute the application. Once your application is complete, you can install the resulting program on your computer or distribute it and share it with others. Visual Basic Express Edition uses a new technology known as ClickOnce Publishing that allows you to easily deploy an application using a wizard, and to automatically provide updated versions of the application if you later make changes.
At first glance, the user interface for Visual Basic Express Edition, also known as the Integrated Development Environment or IDE, may seem unfamiliar, but once you learn your way around, you will find it is easy to use. The following sections describe parts of the IDE that you will use the most.
When you first open Visual Basic Express Edition, you see that most of the IDE is filled with the Start Page window. The Start Page contains a clickable list of your recent projects, a Getting Started area with links to important Help topics, and a list of links to online articles and other resources. If you are connected to the Internet, this list will be updated on a regular basis.
You can change what appears on the Start Page to match your personal preferences. For more information, see.
On the right-hand side of the IDE, you see the Solution Explorer window. It is initially blank, but this is where information about your project, or groups of projects known as solutions, will be displayed. For more information, see.
Figure 1: Solution Explorer
On the left-hand side of the IDE, you see a vertical tab marked Toolbox. It is also initially blank, but as you work it will be filled up with items that can be used for the task you are currently working on. For more information, see.
Across the top of the IDE are a menu bar and a toolbar. The available menus and toolbar buttons change based on your current task—take some time to explore and see what choices are available. You can also customize the menus and toolbar to match your personal preferences. For more information, see.
Across the very bottom of the IDE is a status bar that displays Ready. As you work in the IDE, the status bar changes, displaying messages related to your current task—for example, the status bar shows information about the progress of a project you are building.
When you open or create a project, the appearance of the IDE changes into design mode. This is the visual part of Visual Basic, where you design the appearance of your application.
Figure 2: IDE in Design Mode
In design mode, the Start Page is covered by another window known as the Form Designer, which is basically a blank canvas that represents the user interface for your application. Notice that the Start Page is still available by clicking its tab above the Form Designer.
When the Form Designer is visible, the Toolbox contains a number of controls (representations of buttons, text fields, grids, and so forth) that can be placed on the form and arranged as you like. For more information, see.
You will also notice that a new window, the Properties window, appears below the Solution Explorer window. This is where you will set the various properties that define the appearance and behavior of the form and its controls. For more information, see.
The Task List window at the bottom of the IDE isn't shown by default, but it provides a place that you can keep track of tasks that need to be done or make notes while you are programming. For more information, see.
If you double-click a form or control, a new window called the Code Editor opens. This is where you write the actual code for your application. More than just a text editor, the Code Editor uses a technology known as Intellisense to help you write code by providing relevant information as you type. For more information, see.
For some types of projects, such as Class Library projects that have no user interface, the Code Editor is shown instead of the Form Designer.
When you run or debug your application, the IDE changes into run mode. The application itself is launched, and an additional window related to debugging appears. While in run mode, you cannot make changes in the Form Designer, Properties window, or Solution Explorer, but you can make changes to your code in the Code Editor.
Figure 3: Visual Basic form in Break mode
In run mode, a new window known as the Immediate window appears at the bottom of the IDE. If you put the application into break mode, you can query values and test code in the Immediate window. For more information, see.
Additional windows for watching the value of variables, viewing output, and other debugging tasks can be viewed at run time by selecting them from the Debug menu.
Other Important Windows
There are numerous additional windows that you may encounter in the IDE, each geared to a specific programming task. Some of the more common ones are listed below.
The Error List window appears at the bottom of the IDE if incorrect code is entered or other errors occur at design time. For more information, see.
The Object Browser window is used to examine the properties, methods, and events for any object that can be used in your application. For more information, see.
The Project Designer is used to configure properties for your application, including resources, debugging behavior, deployment settings, and much more. For more information, see.
The Database Explorer allows you to view and use existing databases or create and design new ones. For more information, see.
Visual Basic Express Edition allows you to customize the IDE by rearranging the window layout, choosing which windows are displayed, adding or removing menu commands and toolbar buttons, and much more. For more information, see.
As you work in Visual Basic Express Edition, help is always just a key-press away. Whether you are in the Code Editor or any other window, pressing the F1 key displays the Help topic most closely related to what you are doing at the time. For example, if you are in the Code Editor and the cursor is on the keyword Inherits, the Help browser is launched and a topic describing the use of the Inherits statement is displayed.
The Help files that are included with Visual Basic Express Edition are a subset of the MSDN Library for Visual Studio 2005 Express Editions, which is in turn a subset of the full MSDN Library. If you are connected to the Internet, you can access any Help topic in the full library. If you do not have online access or you chose not to install the MSDN Library for Visual Studio 2005 Express Editions, some Help topics may not be available.
Help can also be launched from the Help menu, and you can find the topics you are looking for by using the Contents or Index windows or the Search tab. For more information, see.