VB Lecture Notes - VB Software
Objective #1: Recognize the components of the Visual Studio .NET integrated development environment.
- We will be using the programing language Visual Basic to write computer programs. Many people call Visual Basic by its acronym VB. However, I also refer to the software that we use
as Visual Basic.
- The software VB is called an integrated development environment (IDE) which means that it is one program that allows a programmer to type his/her program, debug
the program, build or compile the program, and execute the program. This enables modern programmers to be much more efficient than programmers back in the 1960's and 1970's when separate programs were
used for each of these tasks.
- The form window (or just plain "form") is where you place objects that will be seen by the user.
- The Solution Explorer window, in the upper-right corner, shows the filenames of all of the form (.vb) files that are contained in your current project.
- The Properties window, in the lower right-corner, allows you to set most any property of the object which is currently selected in the form window.
- The Toolbox usually appears along the left edge of the screen. It contains icons for tools that you use to place objects on a form. You can double click an icon
to place an object to appear on the current form. You can pass your mouse over each tool to see the name of the tool appear in a pop-up window.
- The main Visual Basic window holds the menu bar (across the top) and the Toolbar (just under the menu bar).
- The Help menu is a very useful and often overlooked repository of information. Use the online Help to learn about Visual Basic!
Objective #2: Describe the various files that make up a Visual Basic project.
- A Visual Basic program is officially known as a project. VB is a more complicated programming environment than older versions of Basic. The project consists of the following
files:
- Each form in a VB project is a file that uses a .vb file extension. Forms are the windows that the user will see during program execution. A form file contains
references to the objects and their properties that are located on the particular form. That is, if you accidentally delete a form file, you lose all of the objects that were placed on that form.
A form file is sometimes called a form module in VB.
- A .sln solution file is saved for each VB solution that you create. Visual Basic holds information necessary to execute the solution here. This is the file
that you should double-click in order to launch Visual Basic and edit your program.
- A .exe executable file that is stored in the bin folder. This file contains binary code (i.e. machine code, 1's and 0's) that the computer uses to execute
your program. Anyone with a Windows computer can double-click this file icon in order to execute your program. But this file cannot be used to view your actual source code.
- IMPORTANT: Visual Basic automatically creates a new folder when you begin a new project. It is very important to make
sure that all files associated with the project stay within its folder. If you move any file outside of this project folder it will probably break your program and make it unexecutable. Also, do not
rename files that are stored in the project folder.
Objective #3: Install the Visual Basic software on your home computer.
- Visit www.microsoft.com/express/vb to download
the free version of Visual Basic 2008 Express Edition which we currently have installed in the Room 202 computer lab.
- VB only runs on Windows.
- You may be required to perform a Windows Update before you install VB on your home computer.
- If you have a network running at home with your files saved on a file server, you may need to make the following change to be able to execute your VB programs. Go to the Control
Panel/Administrative Tools/MS.NET Framework 1.1/runtime security policy/machine/code groups/all code/local intranet zone/properties and set permission to "Full Trust". Another method of
avoiding related errors is found here.