SlideShare a Scribd company logo
Lecture 1
Visual programming using visualIDEs.
Visual Basic is an IDE that allows you to develop Windows (Graphic User Interface - GUI)
applications. The applications have a familiar appearance to the user.
An integrated development environment (IDE) or interactive development environment is a
software application that provides comprehensive facilities to computer programmers for
software development. An IDE normally consists of a source code editor, build automation tools
and a debugger. Most modern IDEs offer Intelligent code completion feature.
Visual Basic has gone through many phases of development since the days of BASIC that was
built for DOS . BASIC stands for Beginners' All-purpose Symbolic Instruction Code. The program
code in Visual Basic resembles the English language. Different software companies had
produced many different versions of BASIC for DOS, such as Microsoft QBASIC, QUICKBASIC,
GWBASIC, and IBM BASICA and more. Then,
Microsoft launched the first graphical BASIC which was known as Visual Basic Version1 in 1991.
It is GUI based and especially developed for MS window. Since then the DOS versions of BASIC
were slowly phased out and almost completely replaced by Visual Basic.
Visual Basic was initially a functional or procedural programming language until the popular
Visual Basic 6.
Object-Oriented Programming language: Object-Oriented programming languages are event-
driven. Here you don’t just have a series of statements that are executed, you have several
choices of different things you can do in a program. You select the event that you want to
occur. Only the code for that event is executed.
Visual Basic is event-driven, meaning code remains idle until called upon to respond to some
event (button pressing, menu selection, ...).
Nothing happens until an event is detected. Once an event is detected, the code corresponding
to that event (event procedure) is executed. Program control is then returned to the event
processor.
The final release was version 6 in 1998 (now known simply as Visual Basic). Though Visual Basic
6.0 IDE is unsupported as of April 8, 2008, the Visual Basic teamis committed to “It Just Works”
compatibility for Visual Basic 6.0 applications on Windows Vista, Windows Server 2008
including R2, Windows 7, and Windows 8.
Programming in VB is a combination of visually arranging components or controls on a form,
specifying attributes and actions for those components, and writing additional lines of code for
more functionality. Since VB defines default attributes and actions for the components, a
programmer can develop a simple program without writing much code.
Application (Project) is made up of:
 Forms - Windows that you create for user interface
 Controls - Graphical features drawn on forms to allow user interaction (text boxes,
labels, scroll bars, command buttons, etc.) (Forms and Controls are objects.)
 Properties - Every characteristic of a form or control is specified by a property. Example
properties include names, captions, size, color, position, and contents. Visual Basic
applies default properties. You can change properties at design time or run time.
 Methods - Built-in procedure that can be invoked to impart some action to a particular
object.
 Event Procedures - Code related to some object. This is the code that is executed when
a certain event occurs.
 General Procedures - Code not related to objects. This code must be invoked by the
application.
 Modules - Collection of general procedures, variable declarations, and constant
definitions used by application.
Steps in Developing Application
There are three primary steps involved in building a Visual Basic application:
1. Draw the user interface
2. Assign properties to controls
3. Attach code to controls
Six windows appear when you start Visual Basic.
1. The Main Window consists of the title bar, menu bar, and toolbar. The title bar
indicates the project name, the current Visual Basic operating mode, and the current
form. The menu bar has drop-down menus from which you control the operation of the
Visual Basic environment. The toolbar has buttons that provide shortcuts to some of the
menu options.
2. The Form Window is central to developing Visual Basic applications. It is where you
draw your application.
3. The Toolbox is the selection menu for controls used in your application.
4. The Properties Window is used to establish initial property values for objects. The drop-
down box at the top of the window lists all objects in the current form. Two views are
available: Alphabetic and Categorized. Under this box are the available properties for
the currently selected object.
5. The Form Layout Window shows where (upon program execution) your form will be
displayed relative to your monitor’s screen:
6. The Project Window displays a list of all forms and modules making up your application.
You can also obtain a view of the Form or Code windows (window containing the actual
Basic coding) from the Project window.
Variables:
Temporary memory location where we store data according to the datatype.
 Numeric (integer, double)
 String
 Boolean
 Date
 Object
 Variant
Variable types:
Local: accessible only within a function or method or event procedure, where it is declared
Form wide: accessible to all functions of a form where it is declared
Application wide: accessible to all forms of an application in which it is declared
Two ways of declaring variables:
Implicit: automatically declare variant type
Explicit: properly declare the variable and its type
Dim a as integer (Dim: keyword)
a=10
option explicit: we write option explicit to force our self to use explicit variables to
minimize error chances.
Example:
Dim a as integer
Input print
Event procedure Event procedure
a= inputbox(“Enter value of a”); print a

More Related Content

What's hot (20)

PPT
Vb basics
sagaroceanic11
 
PPS
Vb6.0 Introduction
Tennyson
 
DOCX
Visual basic
Dharmik
 
PDF
Visual Basic IDE Introduction
Ahllen Javier
 
PPTX
Visusual basic
Mandavi Classes
 
PPTX
Introduction to visual basic
Manav Khandelwal
 
PPT
Visual basic ppt for tutorials computer
simran153
 
PPTX
Working with visual basic applications
Sara Corpuz
 
PPT
Visual basic
umesh patil
 
PPT
Chapter 01: Intro to VB2010 Programming
patf719
 
PDF
Vb tutorial
Saikarthik103212
 
PPTX
Visual Basic Controls ppt
Ranjuma Shubhangi
 
PPTX
Programming basics
Senri DLN
 
PPTX
Visual Programming
Bagzzz
 
PPTX
Chapter 1 — Introduction to Visual Basic 2010 Programming
francopw
 
PPT
02 intro to vb-net ide
Jomel Penalba
 
PPTX
visual basic programming
sowndaryadharmaraj
 
PPT
Introduction to vb.net
Saad Wazir
 
PDF
Visual basic 6.0
sanket1996
 
PPTX
Chapter 03 - Program Coding and Design
patf719
 
Vb basics
sagaroceanic11
 
Vb6.0 Introduction
Tennyson
 
Visual basic
Dharmik
 
Visual Basic IDE Introduction
Ahllen Javier
 
Visusual basic
Mandavi Classes
 
Introduction to visual basic
Manav Khandelwal
 
Visual basic ppt for tutorials computer
simran153
 
Working with visual basic applications
Sara Corpuz
 
Visual basic
umesh patil
 
Chapter 01: Intro to VB2010 Programming
patf719
 
Vb tutorial
Saikarthik103212
 
Visual Basic Controls ppt
Ranjuma Shubhangi
 
Programming basics
Senri DLN
 
Visual Programming
Bagzzz
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
francopw
 
02 intro to vb-net ide
Jomel Penalba
 
visual basic programming
sowndaryadharmaraj
 
Introduction to vb.net
Saad Wazir
 
Visual basic 6.0
sanket1996
 
Chapter 03 - Program Coding and Design
patf719
 

Similar to Vb lecture (20)

PPTX
introduction to visual basic PPT.pptx
classall
 
PPTX
vb.pptx
CherryLim21
 
PDF
vb-160518151614.pdf
LimEchYrr
 
PPTX
vb-160518151614.pptx
LimEchYrr
 
PPT
VB6_INTRODUCTION.ppt
BhuvanaR13
 
PPT
vb-1605181cbddfbfbdfbfdbdfbfdbdfbfdbfdb51614.ppt
Anwar Patel
 
PPTX
LESSON1-INTRODUCTION-TO-VISUALBASIC-1.pptx
claritoBaluyot2
 
PPTX
LESSON1-INTRODUCTION-TO-VISUALBASIC-1.pptx
claritoBaluyot2
 
PPTX
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptx
EliasPetros
 
PDF
Ch02 bronson
Bharathi N Reddy
 
PPTX
Introduction to Visual Basic Programming
abacusgtuc
 
PPTX
Login Project with introduction .pptx
kulmiyealiabdille
 
PDF
Visual basic
Shabista Imam
 
PPTX
Lesson 4 Introduction to Human Computer Interaction.pptx
EllenGracePorras
 
PPTX
Introduction to Visual Basic 6.0 Fundamentals
Sanay Kumar
 
DOCX
Visual basic concepts
melody77776
 
PDF
Future Scope in Application Developement of Visual Basic
ijtsrd
 
PPTX
Class viii ch-7 visual basic 2008
jessandy
 
DOCX
unit 4.docx
Sadhana Sreekanth
 
PPTX
Visual Programming
ASHRAFALI592771
 
introduction to visual basic PPT.pptx
classall
 
vb.pptx
CherryLim21
 
vb-160518151614.pdf
LimEchYrr
 
vb-160518151614.pptx
LimEchYrr
 
VB6_INTRODUCTION.ppt
BhuvanaR13
 
vb-1605181cbddfbfbdfbfdbdfbfdbdfbfdbfdb51614.ppt
Anwar Patel
 
LESSON1-INTRODUCTION-TO-VISUALBASIC-1.pptx
claritoBaluyot2
 
LESSON1-INTRODUCTION-TO-VISUALBASIC-1.pptx
claritoBaluyot2
 
hjksjdhksjhcksjhckjhskdjhcskjhckjdppt.pptx
EliasPetros
 
Ch02 bronson
Bharathi N Reddy
 
Introduction to Visual Basic Programming
abacusgtuc
 
Login Project with introduction .pptx
kulmiyealiabdille
 
Visual basic
Shabista Imam
 
Lesson 4 Introduction to Human Computer Interaction.pptx
EllenGracePorras
 
Introduction to Visual Basic 6.0 Fundamentals
Sanay Kumar
 
Visual basic concepts
melody77776
 
Future Scope in Application Developement of Visual Basic
ijtsrd
 
Class viii ch-7 visual basic 2008
jessandy
 
unit 4.docx
Sadhana Sreekanth
 
Visual Programming
ASHRAFALI592771
 
Ad

More from alldesign (20)

DOCX
Vb lecture notes
alldesign
 
PDF
Color model
alldesign
 
PDF
Computer graphics circle
alldesign
 
PDF
Getstart graphic
alldesign
 
PDF
Image types,raster and vector graphics
alldesign
 
PDF
Graphics c
alldesign
 
PDF
Image types,raster and vector graphics
alldesign
 
PPTX
Graphics display devices
alldesign
 
PPT
Circles graphic
alldesign
 
PPTX
Cg applications
alldesign
 
PPTX
Types of cards
alldesign
 
PPTX
External types of hardware
alldesign
 
PPTX
Devices of computer
alldesign
 
PPTX
Internal computer hardware
alldesign
 
PPTX
Computer hardware
alldesign
 
PPTX
Types of slots
alldesign
 
PPTX
Application of computer graphic
alldesign
 
PPTX
What is computer graphics
alldesign
 
PPTX
Types of rom
alldesign
 
PPTX
Types of ram
alldesign
 
Vb lecture notes
alldesign
 
Color model
alldesign
 
Computer graphics circle
alldesign
 
Getstart graphic
alldesign
 
Image types,raster and vector graphics
alldesign
 
Graphics c
alldesign
 
Image types,raster and vector graphics
alldesign
 
Graphics display devices
alldesign
 
Circles graphic
alldesign
 
Cg applications
alldesign
 
Types of cards
alldesign
 
External types of hardware
alldesign
 
Devices of computer
alldesign
 
Internal computer hardware
alldesign
 
Computer hardware
alldesign
 
Types of slots
alldesign
 
Application of computer graphic
alldesign
 
What is computer graphics
alldesign
 
Types of rom
alldesign
 
Types of ram
alldesign
 
Ad

Recently uploaded (20)

PDF
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PPTX
ETP Presentation(1000m3 Small ETP For Power Plant and industry
MD Azharul Islam
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PPTX
Information Retrieval and Extraction - Module 7
premSankar19
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
ENSA_Module_7.pptx_wide_area_network_concepts
RanaMukherjee24
 
PPTX
Water resources Engineering GIS KRT.pptx
Krunal Thanki
 
PPTX
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
PPTX
Inventory management chapter in automation and robotics.
atisht0104
 
PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Jual GPS Geodetik CHCNAV i93 IMU-RTK Lanjutan dengan Survei Visual
Budi Minds
 
PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PPTX
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PPTX
filteration _ pre.pptx 11111110001.pptx
awasthivaibhav825
 
PDF
4 Tier Teamcenter Installation part1.pdf
VnyKumar1
 
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
ETP Presentation(1000m3 Small ETP For Power Plant and industry
MD Azharul Islam
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
Information Retrieval and Extraction - Module 7
premSankar19
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
ENSA_Module_7.pptx_wide_area_network_concepts
RanaMukherjee24
 
Water resources Engineering GIS KRT.pptx
Krunal Thanki
 
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
Inventory management chapter in automation and robotics.
atisht0104
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Jual GPS Geodetik CHCNAV i93 IMU-RTK Lanjutan dengan Survei Visual
Budi Minds
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
filteration _ pre.pptx 11111110001.pptx
awasthivaibhav825
 
4 Tier Teamcenter Installation part1.pdf
VnyKumar1
 

Vb lecture

  • 1. Lecture 1 Visual programming using visualIDEs. Visual Basic is an IDE that allows you to develop Windows (Graphic User Interface - GUI) applications. The applications have a familiar appearance to the user. An integrated development environment (IDE) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger. Most modern IDEs offer Intelligent code completion feature. Visual Basic has gone through many phases of development since the days of BASIC that was built for DOS . BASIC stands for Beginners' All-purpose Symbolic Instruction Code. The program code in Visual Basic resembles the English language. Different software companies had produced many different versions of BASIC for DOS, such as Microsoft QBASIC, QUICKBASIC, GWBASIC, and IBM BASICA and more. Then, Microsoft launched the first graphical BASIC which was known as Visual Basic Version1 in 1991. It is GUI based and especially developed for MS window. Since then the DOS versions of BASIC were slowly phased out and almost completely replaced by Visual Basic. Visual Basic was initially a functional or procedural programming language until the popular Visual Basic 6. Object-Oriented Programming language: Object-Oriented programming languages are event- driven. Here you don’t just have a series of statements that are executed, you have several choices of different things you can do in a program. You select the event that you want to occur. Only the code for that event is executed. Visual Basic is event-driven, meaning code remains idle until called upon to respond to some event (button pressing, menu selection, ...). Nothing happens until an event is detected. Once an event is detected, the code corresponding to that event (event procedure) is executed. Program control is then returned to the event processor. The final release was version 6 in 1998 (now known simply as Visual Basic). Though Visual Basic 6.0 IDE is unsupported as of April 8, 2008, the Visual Basic teamis committed to “It Just Works” compatibility for Visual Basic 6.0 applications on Windows Vista, Windows Server 2008 including R2, Windows 7, and Windows 8. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions for those components, and writing additional lines of code for more functionality. Since VB defines default attributes and actions for the components, a programmer can develop a simple program without writing much code. Application (Project) is made up of:  Forms - Windows that you create for user interface  Controls - Graphical features drawn on forms to allow user interaction (text boxes, labels, scroll bars, command buttons, etc.) (Forms and Controls are objects.)
  • 2.  Properties - Every characteristic of a form or control is specified by a property. Example properties include names, captions, size, color, position, and contents. Visual Basic applies default properties. You can change properties at design time or run time.  Methods - Built-in procedure that can be invoked to impart some action to a particular object.  Event Procedures - Code related to some object. This is the code that is executed when a certain event occurs.  General Procedures - Code not related to objects. This code must be invoked by the application.  Modules - Collection of general procedures, variable declarations, and constant definitions used by application. Steps in Developing Application There are three primary steps involved in building a Visual Basic application: 1. Draw the user interface 2. Assign properties to controls 3. Attach code to controls Six windows appear when you start Visual Basic. 1. The Main Window consists of the title bar, menu bar, and toolbar. The title bar indicates the project name, the current Visual Basic operating mode, and the current form. The menu bar has drop-down menus from which you control the operation of the Visual Basic environment. The toolbar has buttons that provide shortcuts to some of the menu options. 2. The Form Window is central to developing Visual Basic applications. It is where you draw your application. 3. The Toolbox is the selection menu for controls used in your application. 4. The Properties Window is used to establish initial property values for objects. The drop- down box at the top of the window lists all objects in the current form. Two views are available: Alphabetic and Categorized. Under this box are the available properties for the currently selected object. 5. The Form Layout Window shows where (upon program execution) your form will be displayed relative to your monitor’s screen: 6. The Project Window displays a list of all forms and modules making up your application. You can also obtain a view of the Form or Code windows (window containing the actual Basic coding) from the Project window. Variables: Temporary memory location where we store data according to the datatype.  Numeric (integer, double)  String  Boolean
  • 3.  Date  Object  Variant Variable types: Local: accessible only within a function or method or event procedure, where it is declared Form wide: accessible to all functions of a form where it is declared Application wide: accessible to all forms of an application in which it is declared Two ways of declaring variables: Implicit: automatically declare variant type Explicit: properly declare the variable and its type Dim a as integer (Dim: keyword) a=10 option explicit: we write option explicit to force our self to use explicit variables to minimize error chances. Example: Dim a as integer Input print Event procedure Event procedure a= inputbox(“Enter value of a”); print a