0% found this document useful (0 votes)
38 views

Lesson 3-Part I - Visual Basic 2008 Express

Visual Basic 2008 Express Edition is an integrated development environment that allows users to develop graphical user interface applications. It includes tools like a form designer, code editor, compiler, debugger, and object browser. The IDE displays code and forms in a document window with tabs. The solution explorer shows all project files and forms. Properties and code can be viewed and edited. Errors are listed in the error list window. Visual Basic uses an object-oriented model with classes, objects, properties, methods, and events. Development involves a three step process of planning the interface and code, programming the interface and properties, and writing the code.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Lesson 3-Part I - Visual Basic 2008 Express

Visual Basic 2008 Express Edition is an integrated development environment that allows users to develop graphical user interface applications. It includes tools like a form designer, code editor, compiler, debugger, and object browser. The IDE displays code and forms in a document window with tabs. The solution explorer shows all project files and forms. Properties and code can be viewed and edited. Errors are listed in the error list window. Visual Basic uses an object-oriented model with classes, objects, properties, methods, and events. Development involves a three step process of planning the interface and code, programming the interface and properties, and writing the code.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

VISUAL BASIC 2008

EXPRESS EDITION
VISUAL BASIC

• is an object- oriented programming language (high level) which


was evolved from earlier DOS version called BASIC.
• It is event driven ,meaning code remains idle until called to
respond to some event.
VISUAL STUDIO INTEGRATED DEVELOPMENT
ENVIRONMENT
IDE consists of various tools, including a
• form designer- which allows you to visually create a form;
• an editor- for entering and modifying program code;
• compiler-for translating the Visual Basic statements into the intermediate
machine code;
• debugger, to help locate and correct program errors;
• an object browser- to view available classes,
• objects, properties, methods, and events; and a Help facility.
STARTING MICROSOFT VISUAL BASIC 2008 EXPRESS
EDITION

1. Select Start >All Programs > Visual Basic 2008 Express


Edition. The VB 2008 IDE appears. The initial window is the
Start Page tab.
2. To start a new VB 2008 project, click on the New Project under the Start
section to launch the VB 2008 New Project page as shown below. Type
the Name of your Project and browse your desired location.
UNDERSTANDING
VB 2008
ENVIRONMENT
THE DOCUMENT WINDOW

The largest window in the center of the screen. Notice the tabs
across the top of the window, which allow you to switch between
open documents. The items that display in the Document window
include the
Form Designer, the Code Editor, the Database Designer, and the
Object Browser.
You can switch from one tab to another, or close any of the
documents using its Close button.
THE FORM DESIGNER

• It is where you design a form that makes up your user


interface.
• You can drag the form’s sizing handle or selection border to
change the size of the form.
• When you begin a new Visual Basic Windows application, a
new form is added to the project with the default name Form1.
THE SOLUTION EXPLORER WINDOW

• The Solution Explorer window provides easy access to all


forms associated with the project. It lets developer to easily
view codes and properties in just one click.
Refresh View Code
Show All Files View Designer

Properties
THE PROPERTIES WINDOW

• The Properties window is used to


view and set the properties of
objects. This can be seen on the
right side of the design
environment. It is perhaps the
most important window in the
IDE, since it is the one used most
often.
THE TOOLBOX
• It holds the tools you use to place
controls on a form. You may have
more or different tools in your
toolbox, depending on the edition of
Visual Basic
you are using (Express, Standard,
Professional, or Team System).
ERROR LIST WINDOW

• The Error list window shows all error messages, warnings,


and suggestions in a program after compiling. It may also
indicate the line of code where the error occurs.
THE OBJECT
MODEL

IN VISUAL BASIC YOU WILL WORK WITH OBJECTS, WHICH


HAVE PROPERTIES, METHODS, AND EVENTS. EACH OBJECT
IS BASED ON A CLASS.
• Objects-Examples of objects are forms and controls.
Forms are the windows and dialog boxes you place on the screen; controls are the
components you place inside a form, such as text boxes, buttons, and list boxes.
• Properties- tell something about or control the behavior of an object, such as its name, color,
size, or location. You can think of properties as adjectives that describe objects.
Example: Name, Text, BackColor, ForeColor, TextAlign, AutoSize, BorderStyle
• Methods-an action that an object can perform. Some typical methods are Close, Show, and
Clear.
Example : ExitButton.Show(), Print(), Clear(), Close()
• Events- An event is an action recognized by an object, such as clicking the mouse or pressing a key, and for which you can
write code to respond. Events can occur as a result of a user action or program code, or they can be caused by the system.
Code that signals an event is said to raise the event, and code that responds to it is said to handle it.
• Classes a template or blueprint used to create a new object. Classes contain the definition of all available properties, methods, and events.
• Defines what an object of the class will consist of 
DESIGN TIME, RUN TIME, AND
DEBUG TIME
Visual Basic has three distinct modes
While you are designing the user interface and writing
code, you are in design time. When you are testing and
running your project, you are in run time. If you get a
run-time error or pause program execution, you are in
debug time.
THE THREE-STEP
PROCESS IN
WRITING VISUAL
BASIC PROJECTS
PLANNING
1. Design the user interface.
-When you plan the user interface, you draw a sketch of the screens the user will see when
running your project. On your sketch, show the forms and all the controls that you planto use.
Indicate the names that you plan to give the form and each of the objects on the form.
2. Plan the properties.
- write down the properties that you plan to set or change during the design of the form.
3. Plan the Basic code.
- plan the classes and procedures that will execute when your project runs. You will determine
which events require action to be taken and then make a step-by-step plan for those actions.
(pseudocode)
PROGRAMMING
1. Define the user interface.
-When you define the user interface, you create the forms and controls that you designed in the
planning stage. Think of this step as defining the objects you will use in your application.
2. Set the properties.
-When you set the properties of the objects, you give each object a name and define such attributes as
the contents of a label, the size of the text, and the words that appear on top of a button and in the
form’s title bar.
3. Write the Basic code.
-You will use Basic programming statements (called Basic code) to carry out the actions needed by
your program. You will be surprised and pleased by how few statements you need to create a
powerful Windows program. You can think of this third step as defining the
actions of your program.

You might also like