Вы находитесь на странице: 1из 20

VISUAL BASIC 6.

0
Graphical User Interface (GUI)
 Graphical User Interface (GUI)
- (“gooey”) is a type of user interface that allows users
to interact with electronic devices which employs
graphic elements (dialog boxes, icons, menus, scroll
bars) instead of text characters to let the user give
commands to the computer or to manipulate what is on
the screen.
A Sample Graphical User Interface (GUI)

Label TextBox

GroupBox
PictureBox
RadioButtons

Buttons
Form

3 Mr. Roger C. Argarin 7/30/2019


Computer Programming Paradigm
 Procedural Program
- describes how to do something step by step in
computer programming.
- is basically just a list of commands, and it nicely suited
to the way that a computer works at a low level. It is, in
essence, just telling the computer "do this, then do this,
then do this," and so on.
Simple Procedure Program
int main() {
printf("Hello, World!\n");
return 0;
}

 Everything is laid out from start to finish plainly. As soon as


you execute it starts at main and works its way through.
Event-Driven Program
- is a programming paradigm in which the flow of the
program is determined by events such as user actions
(mouse clicks, key presses), sensor outputs, or messages
from other programs/threads.
- describes what to do when an external situation comes to
pass.
- is all about responding to events.
Simple Event-Driven Program

void onClickButton() {
echo 'YOU CLICKED THE BUTTON, GOOD JOB';
}
void onClickLabel() {
echo 'NOW YOU CLICKED THE LABEL';
}

 This program has no clear start or end - what happens and in


what order is controlled by something external to our code.
Object-Oriented Program

- It models everything as the interaction of objects with


defined attributes and means of being manipulated.
- it's all about the objects.
Simple Object-Oriented Program

class Bottle {
int size;
int currentFilledAmount;
Bottle(){
size = 5; currentFilledAmount = 0;
}
void fill( int x ){ this->currentFilledAmount += x; } }

 Depending on which language you're using how the code actually


executes can vary. In C++, for example, you'll usually write a
procedural program that works with objects, and in that way you
make a hybrid of the paradigms.
What is Visual Basic?
 Visual Basic
- is a tool that allows you to develop Windows (Graphic
User Interface - GUI) applications. The applications
have a familiar appearance to the user.
- Visual Basic is event-driven, meaning code remains
idle until called upon to respond to some event (button
pressing, menu selection, ...).
History of Visual Basic
 The Visual Basic programming language was developed
by Alan Cooper, an American scientist in the late 1980’
 This programming language was created with the main
purpose of teaching programmers and developers how
to design graphical-user interface (GUI) programs
easily.
 B (Beginner's)
 A (All-Purpose)
 S (Symbolic)
 I (Instruction)
 C (Code)
HOW TO WORK Visual Basic (VB) is the third-generation
event-driven programming language and
WITH VISUAL integrated development environment
(IDE) from Microsoft or its COM
BASIC? programming model. Visual Basic is
relatively easy to learn and use. Visual Basic
was derived from BASIC and enables the
rapid application development (RAD) of
graphical user interface (GUI) applications,
access to databases using Data Access
Objects, Remote Data Objects, or ActiveX
Data Objects, and creation of ActiveX
controls and objects. Scripting languages
such as VBA and VBScript are syntactically
similar to Visual Basic, but perform
differently. A programmer can put
together an application using the
components provided with Visual Basic
itself. Programs written in Visual Basic can
also use the Windows API, but doing so
requires external function declarations.
The final release was version 6 in 1998.
Microsoft's extended support ended in
March 2008 and the designated successor
was Visual Basic .NET (now known simply
as Visual Basic).
Six windows appear when you start Visual Basic
1. Main Window - consists of the title bar, menu bar, and
toolbar.
 Title Bar – indicates the project name, the current
Visual Basic operating mode, and the current form.
 Menu Bar - has drop-down menus from which you
control the operation of the Visual Basic
environment.
 Toolbar - has buttons that provide shortcuts to some
of the menu options.
Six windows appear when you start Visual Basic
Six windows appear when you start Visual Basic
2. Form Window - is central to developing Visual Basic
applications. It is where you draw your application.
Six windows appear when you start Visual Basic
3. Toolbox - is the selection menu for controls used in
your application.
Six windows appear when you start Visual Basic
4. Properties Window - is used to establish initial
property values for objects.
Six windows appear when you start Visual Basic
5. Form Layout Window - shows where (upon program
execution) your form will be displayed relative to your
monitor’s screen
Six windows appear when you start Visual Basic
6. Project Window - displays a list of all forms and
modules making up your application.
COMPONENTS OF VB WINDOW
Title
bar
Project
Menu window
bar

Properties
window
Tool
bar

Form
window
Properties
layout
Tool box window

Вам также может понравиться