The IDE
Although Visual Basic project files are text files, creating an application from scratch involves a lot of hard work. The Integrated Development Environment (IDE) greatly simplifies the task of the programmer, and it is this environment which appears when you start Visual Basic. The main components of the VB IDE are shown below:
-
Menu / toolbar
- this component is always visible and is used to select other IDE components,
and to add forms or controls to a project. Other features of the menu / toolbar
are discussed later.
-
Toolbox
- a collection of controls which can be added to an application.
-
Project window
- a list of the forms that make up the VB project.
-
Property window
- controls have a number of parameters (properties) which define how they
work. Some of these properties can be set during the design stage, within the
IDE. Other properties are determined by the program's code.
-
Forms
- these are the windows which hold the various controls (buttons, text boxes,
etc.) which make up the application, and are added to the application as
required.
-
Code window
- this is where VB program code is entered for an event. The window heading
indicates the event with which the code is associated.
When a new VB project is started, it has a single form with no controls. In a typical VB session, you would add any additional forms required, place controls on forms, and set the properties for both forms and controls. You would then write the code for the various event procedures, and either create the executable program or run the program within the IDE. Each form created within your application is saved in a separate file on the hard drive with the extension ".frm". The name and location of each of these forms is stored in the project file, which has the extension "vbp", together with information about all the other files and controls which make up the VB project. All of these files are ASCII text files, which can be edited using a simple text editor - if you know what you are doing, of course.