VB Lecture Notes - VB Software
Objective #1: Recognize the components of the Visual Basic 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 forms 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 (across the top of the screen just under the menu bar). The Toolbar contains the green Run button that we use to execute our programs.
- 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 project that you create. This is the file
that you should double-click in order to open a VB project that you previously saved. The icon for this file has the number 10 in the upper-right corner.
- 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.
- You can download the latest version of Visual Basic for free by clicking "Visual Studio 2015" and then downloading "Express 2015 for Desktop" at https://www.visualstudio.com/downloads/download-visual-studio-vs# . This copy of Visual Studio includes Visual Basic. However, you will find out that any program you create on your home computer will not execute on a school computer where we have the older Visual Basic 2010 installed. In other words, Visual Basic is not backward-compatible.
If you want to be able to work on projects on your home computer and a school computer, you can download the same version of Visual Basic 2010 that we use at school at visual-basic.soft32.com .
There may be other places on the Internet to download a less legal copy of Visual Basic 2010 that does not expire after 90 days.
- VB only runs on Windows computers and not on Macintosh computers or iPads.
Objective #4: Transfer files back and forth from school to home.
- You can compress (i.e. zip) Visual Basic projects that you have stored on a school computer and copy them to your OneDrive account. This will allow you to download the compressed file to your home computer and then uncompress the file so that the project can be opened by VB on your home computer.