Professional Documents
Culture Documents
Project Explorer KD
Project Explorer KD
The Project Explorer can be found in the top left portion of the Microsoft Visual Basic window.
It is a hierarchical listing of the objects recognized by VBA.
If the Project Explorer is not visible when you open the Microsoft Visual Basic window, you can
make it visible by selecting Project Explorer under the View menu.
In the example below, there are two "Microsoft Access Class Objects" - one is a form called
frmProducts and the other is a report called rptCategories_Report.
Multimedia applications
Microsoft Visual Basic uses the principles of the BASIC language (Beginners All-
Purpose Symbolic Instruction Code). Due to the advancement of windows
programming Microsoft developed the Visual Basic programming language. The
emphasis on Visual Basic is to develop Windows applications, an example is shown
below (Figure 1.1):
Figure 1.1
The diagram shows a
typical Graphical User
interface which has been
created using Visual Basic.
An application like this can
take only a couple of hours
to create!
Figure 1.2
From the diagram it can be seen that the IDE is divided into separate areas or 'windows'. We
have the Toolbox control which allows us to add objects on to Form window. We can change
the properties using the properties windows for all the objects on the form. We can also
edit/create the event handlers using the Code Window. When creating applications in Visual
Basic it is quite common to use multiple forms, modules etc. The project explorer window is
used to keep track of all the additional files used.
The main components of the Integrated Development Environment (IDE) are
illustrated in the subsequent text.
The Toolbar
Visual Basic supports multiple toolbars which are split into three main areas
Standard toolbar
Edit toolbar
Debug toolbar
You are able to customise the toolbar by clicking the right mouse button of the toolbar
and selecting <Customize> and changing the options you require. The diagram and
components of the standard toolbar are illustrated below:
The Toolbox
The diagram below shows the main tools that appear on the standard Toolbox
window. These are called the intrinsic controls because all three editions of VB
support these standard tools. You can add additional controls to the toolbox as your
needs grow. Some extra tools come with all three editions of VB, but these extra tools
do not appear on the Toolbox window until you add them through the <Project |
Components> menu option.
All standard components of Windows interfaces can be created here. The Toolbox is
selected by choosing Toolbox menu from the View menu.
The Form Window
The Form window is your primary work area where the visual development of the
application is created or modified. Although the Form window first appears small
relative to the rest of the screen, the Form window comprises the background of the
application.
The Form window holds the program's interactive objects, to view the code for
the Form window or any object we can Select <View | Code >. The Code window is
little more than a text editor with which you write the programming statements that tie
the application together.
An alternative technique to view the code is to double click anywhere on the form or
the object and view the code for that particular object. The diagram shows the Code
Window for the form.
The parts of the application that you create, such as the forms, the code, and the
graphics that you prepare for output, comprise the source program. The code listing
below gives an example of code that is incorporated in a typical application:
The Project Explorer was used to celebrate the resemblance of the window to the
typical Explorer-like tree-structured file views so prevalent in Windows 95 and
98/2000. You can expand and collapse branches of the view to get more or less detail.
The Project Explorer window displays forms, modules (files that hold supporting
code for the application), classes (advanced modules), and more. When you want to
work with a particular part of the loaded application, double-click the component in
the Project window to bring that component into focus.
In other words, if the Project Explorer window displays three forms and you need to
edit one of the forms, locate and double-click the form name in the Project window to
activate that form in the Form window.