SlideShare a Scribd company logo
Introduction
to
Prof. K ADISESHA
Introduction
to
Introduction
Visual Basic 6
Queries
Visual Basic Features
Visual Basic IDE
2
Visual Basic 6
Prof. K. Adisesha (Ph. D)
User Interface
Introduction
Prof. K. Adisesha (Ph. D)
3
History of Programming Languages:
Programming language - formal language used to give instructions to computers.
➢ Machine language
➢ Procedure-oriented languages
➢ Object-oriented languages
➢ Event-driven languages
➢ Natural languages
Introduction
Prof. K. Adisesha (Ph. D)
4
History of Programming Languages:
Programming language - formal language used to give instructions to computers.
➢ Machine Language
❖ It is binary code, different for each computer processor
➢ Procedure-Oriented Languages
❖ FORTRAN
❖ COBOL
❖ Pascal
❖ C
❖ Ada
Introduction
Prof. K. Adisesha (Ph. D)
5
History of Programming Languages:
Programming language - formal language used to give instructions to computers.
➢ Object-oriented languages
❖ Smalltalk
❖ C++
❖ Ada 95
➢ Event-driven languages
❖ Visual Basic
❖ most Visual languages
❖ Ada
Introduction
Prof. K. Adisesha (Ph. D)
6
History of Programming Languages:
Programming language - formal language used to give instructions to computers.
➢ Natural languages
❖ computer will accept a user’s native or natural language, such as
English
❖ Researchers continue to work in this area
Visual Basic
Prof. K. Adisesha (Ph. D)
7
Visual Basic-6:
Visual Basic (VB) is a simple, modern, object-oriented and type-safe programming
language. Visual Basic language has its roots in the family of C languages such as C,
C++ and it is mostly similar to Java programming.
➢ Versions of Visual Basic
❖ 1992 - Visual Basic 1 for Windows 3
❖ 1993 - Visual Basic 3.0 (a vast improvement over previous versions)
❖ 1995 - Visual Basic 4 - for Windows 95
❖ 1996 - Visual Basic 5 - for Office 97
❖ 1998 - Visual Basic 6 - for Windows 98 & Office 2000
Visual Basic
Prof. K. Adisesha (Ph. D)
8
➢ Visual Basic Editions
❖ Learning Edition
❖ Professional Edition
❖ Enterprise Edition
➢ Other Visual Basic packaging options
❖ VBA (Visual Basic for Applications)
❖ Windows CE Toolkit for Visual Basic
❖ Visual Basic Scripting Edition
❖ Control Creation Edition
Visual Basic
Prof. K. Adisesha (Ph. D)
9
Visual Basic is a third-generation event-driven programming language first released by
Microsoft in 1991. It evolved from the earlier DOS version called BASIC.
➢ BASIC means Beginners' All-purpose Symbolic Instruction Code.
Features of Visual Basic:
❖ Full set of objects - you 'draw' the application
❖ Response to mouse and keyboard actions
❖ Full array of mathematical, string handling, and graphics functions
❖ Can handle fixed and dynamic variable and control arrays
❖ Sequential and random access file support
❖ Useful debugger and error-handling facilities
❖ Powerful database access tools
❖ ActiveX support
❖ Package & Deployment Wizard makes distributing your applications simple
Visual Basic
Prof. K. Adisesha (Ph. D)
10
Steps in Developing Application
There are three primary steps involved in building a Visual Basic application.
❖ Draw the user interface
❖ Assign properties to controls
❖ Attach code to controls.
Visual Basic operates in three modes.
❖ Design mode - used to build application
❖ Run mode - used to run the application
❖ Break mode - application halted and debugger is available
Visual Basic
Prof. K. Adisesha (Ph. D)
11
Visual Basic IDE
➢ After installing the vb6 compiler, the
icon will appear on your desktop or in
your programs menu.
➢ Click on the icon to launch the VB6
compiler.
➢ On start up, Visual Basic 6.0 will
display the following dialog box as
shown.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
12
➢ Major windows
❖ Form Designer
❖ Form Layout
❖ Toolbox
❖ Project Explorer
❖ Object Browser
❖ Properties
❖ Code Editor
❖ Immediate, Locals, Watch
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
13
Visual Basic IDE
The 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.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
14
Visual Basic IDE- Menu bar
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
15
Drawing the User Interface and Setting Properties:
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.
➢ There are two ways to place controls on a form:
❖ Double-click the tool in the toolbox and it is created with
a default size on the form. You can then move it or resize it.
❖ Click the tool in the toolbox, then move the mouse pointer
to the form window.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
16
Drawing the User Interface and Setting Properties:
The Form Window is central to developing Visual Basic applications. It is where you
draw your application.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
17
Drawing the User Interface and Setting Properties:
➢ Toolbox is the selection menu for controls used in your application.
➢ Form Layout Window shows where (upon program execution)
your form will be displayed relative to your monitor’s screen:
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
18
➢ Toolbox is the selection menu for controls used in your application.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
19
➢ Toolbox is the selection menu for controls used in your application.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
20
➢ Toolbox is the selection menu for controls used in your application.
Control Description
Pointer Provides a way to move and resize the controls form
PictureBox
Displays icons/bitmaps and metafiles. It displays text or acts as a
visual container for other controls.
TextBox Used to display message and enter text.
Frame Serves as a visual and functional container for controls
CommandButton Used to carry out the specified action when the user chooses it.
CheckBox Displays a True/False or Yes/No option.
OptionButton
OptionButton control which is a part of an option group allows the
user to select only one option even it displays mulitiple choices.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
21
➢ Toolbox is the selection menu for controls used in your application.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
22
➢ Toolbox is the selection menu for controls used in your application.
Control Description
ListBox Displays a list of items from which a user can select one.
ComboBox
Contains a TextBox and a ListBox. This allows the user to select an ietm from
the dropdown ListBox, or to type in a selection in the TextBox.
HScrollBar and
VScrollBar
These controls allow the user to select a value within the specified range of
values
Timer Executes the timer events at specified intervals of time
DriveListBox Displays the valid disk drives and allows the user to select one of them.
DirListBox Allows the user to select the directories and paths, which are displayed.
FileListBox Displays a set of files from which a user can select the desired one.
Control Description
Shape Used to add shape (rectangle, square or circle) to a Form
Line Used to draw straight line to the Form
Image
used to display images such as icons, bitmaps and metafiles. But less capability
than the PictureBox
Data Enables the use to connect to an existing database and display information from it.
OLE
Used to link or embed an object, display and manipulate data from other windows
based applications.
Label Displays a text that the user cannot modify or interact with.
Shape Used to add shape (rectangle, square or circle) to a Form
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
23
➢ Toolbox is the selection menu for controls used in your application.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
24
Drawing the User Interface and Setting Properties:
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
❖ Categorized
➢ Under this box are the available properties
for the currently selected object.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
25
Drawing the User Interface and Setting Properties:
Properties Window is used to establish initial property values for objects.
➢ Properties define the characteristics of an object such as Size, Color etc. or
sometimes the way in which it behaves.
➢ For example, a TextBox accepts properties such as:
❖ Enables property: allows the TextBox to be enabled or disabled at run time depending on
the condition set to True or False.
❖ Font property: sets a particular font in the TextBox.
❖ MultiLine property: allows the TextBox to accept and display multiple lines at run time.
❖ Text property: of the TextBox control sets a particular text in the control.
❖ Visible property: is used to hide the object at run time.
❖ Width property: sets the TextBox to the desired width at design time.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
26
Drawing the User Interface and Setting Properties:
Properties Window is used to establish initial property values for objects.
➢ A very important property for each object is its name. The name is used by Visual
Basic to refer to a particular object in code.
➢ A convention has been established for naming Visual Basic objects.
➢ A few of the prefixes are:
Visual Basic 6- Events
Prof. K. Adisesha (Ph. D)
27
Events: are basically a user action like key press, clicks, mouse movements, etc., or
some occurrence like system generated notifications. Applications need to respond to
events when they occur.
➢ The combination of controls name and event's name is unique and is the name of
the event handler.
➢ The general syntax of event handler is
Private sub controlname.cntrolname_eventname ()
End sub
➢ There are mainly three types of events −
❖ Mouse events
❖ Keyboard events
❖ Focus Events
Visual Basic 6- Events
Prof. K. Adisesha (Ph. D)
28
The Mouse events:
➢ Click :This event takes place when user clicks the mouse button once
Example : Private Sub Form1_Click()
Form1.print “click event is occur”
End Sub
➢ DblClick : The Double click event is called when user clicks the Mouse buttons Twice.
Example : Private Sub Form1_DblClick()
Form1.print “Double click event is occur”
End Sub
➢ MouseDown : The MouseDown event is called when user presses the Mouse buttons down
Example : Private Sub Form1_MouseDown()
Form1.print “Mouse Down event is occur”
End Sub
Visual Basic 6- Events
Prof. K. Adisesha (Ph. D)
29
The Mouse events:
➢ MouseUp :The MouseUp event is called when user presses the Mouse buttons up
Example : Private Sub Form1_MouseUp()
Form1.print “Mouse Up event is occur”
End Sub
➢ MouseMove: The MouseMove event is called when user Moves the Mouse over Form.
Example : Private Sub Form1_MouseMove()
Form1.print “Mouse Move event is occur””
End Sub
Visual Basic 6- Events
Prof. K. Adisesha (Ph. D)
30
The Keyboard events:
➢ KeyDown: The KeyDown event is called when user presses the KeyBoard buttons down
Example : Private Sub Form1_KeyDown()
Form1.print “KeyDown event is occur”
End Sub
➢ KeyUp :The KeyUp event is called when user presses the Mouse buttons up.
Example : Private Sub Form1_KeyUp()
Form1.print “Key Up event is occur”
End Sub
➢ Change :The change event is triggered by various controls when their contents change.
Example : Private Sub Text1_Change()
End Sub
Visual Basic 6- Events
Prof. K. Adisesha (Ph. D)
31
The Focus event:
Focus is the ability of a control to receive user input via keyboard. When an object has the
focus, it can receive input from a user.
➢ These are related events, when the focus is move on one control to the other.
❖ SetFocus : Event occurs when user can change the focus from one control to other.
❖ GotFocus : GotFocus event to initialize a control for editing.
Private Sub Text1_GotFocus ()
Text1.text= “event is occur”
End Sub
❖ LostFocus : LostFocus event to validate the data entered by the use.
Private Sub Text1_LostFocus ()
Text2.setFocus
End Sub
Event Occurrence
Change The user modifies text in a combo box or text box.
Click The user clicks the primary mouse button on an object.
DblClick The user double-clicks the primary mouse button on an object.
DragDrop The user drags an object to another location.
DragOver The user drags an object over another control.
GotFocus An object receives focus.
KeyDown The user presses a keyboard key while an object has focus.
Visual Basic 6- Events
Prof. K. Adisesha (Ph. D)
32
➢ Events: are what happen in and around your program. These events occur as a
result of some specific user action, such as moving the mouse, pressing a key on the
keyboard, or clicking a text box.
Event Occurrence
KeyPress The user presses and releases a keyboard key while an object has focus.
KeyUp The user releases a keyboard key while an object has focus.
LostFocus An object loses focus.
MouseDown The user presses any mouse button while the mouse pointer is over an
object.
MouseMove The user moves the mouse pointer over an object.
MouseUp The user releases any mouse button while the mouse pointer is over an
object.
Visual Basic 6- Events
Prof. K. Adisesha (Ph. D)
33
➢ Events: are what happen in and around your program. These events occur as a result
of some specific user action, such as moving the mouse, pressing a key on the
keyboard, or clicking a text box.
Visual Basic 6 IDE
Prof. K. Adisesha (Ph. D)
34
Example: Program to find sum and average of two numbers
Discussion
Prof. K. Adisesha (Ph. D)
35
Queries ?
Prof. K. Adisesha
9449081542

More Related Content

Similar to VB PPT by ADI part-1.pdf

visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginnerSalim M
 
vb-160518151614.pdf
vb-160518151614.pdfvb-160518151614.pdf
vb-160518151614.pdfLimEchYrr
 
vb-160518151614.pptx
vb-160518151614.pptxvb-160518151614.pptx
vb-160518151614.pptxLimEchYrr
 
Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic conceptsmelody77776
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)bluejayjunior
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basicsyounganand
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0sanket1996
 
Programming basics
Programming basicsProgramming basics
Programming basicsSenri DLN
 
control structure in visual basic
control structure in visual basic control structure in visual basic
control structure in visual basic classall
 
Chapter 01: Intro to VB2010 Programming
Chapter 01: Intro to VB2010 ProgrammingChapter 01: Intro to VB2010 Programming
Chapter 01: Intro to VB2010 Programmingpatf719
 
Basic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfBasic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfPhanithLIM
 
Rancangan tahunan-ictl-form-2-2013
Rancangan tahunan-ictl-form-2-2013Rancangan tahunan-ictl-form-2-2013
Rancangan tahunan-ictl-form-2-2013Shaharizan Hassan
 

Similar to VB PPT by ADI part-1.pdf (20)

Neha
NehaNeha
Neha
 
Vb 6ch123
Vb 6ch123Vb 6ch123
Vb 6ch123
 
Vb basics
Vb basicsVb basics
Vb basics
 
visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginner
 
vb.pptx
vb.pptxvb.pptx
vb.pptx
 
vb-160518151614.pdf
vb-160518151614.pdfvb-160518151614.pdf
vb-160518151614.pdf
 
vb-160518151614.pptx
vb-160518151614.pptxvb-160518151614.pptx
vb-160518151614.pptx
 
Visual Programming
Visual ProgrammingVisual Programming
Visual Programming
 
Visual basic concepts
Visual basic conceptsVisual basic concepts
Visual basic concepts
 
01 Database Management (re-uploaded)
01 Database Management (re-uploaded)01 Database Management (re-uploaded)
01 Database Management (re-uploaded)
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basics
 
Visual basic 6.0
Visual basic 6.0Visual basic 6.0
Visual basic 6.0
 
W1.pptx
W1.pptxW1.pptx
W1.pptx
 
Programming basics
Programming basicsProgramming basics
Programming basics
 
control structure in visual basic
control structure in visual basic control structure in visual basic
control structure in visual basic
 
Introduction to Visual Basic (Week 2)
Introduction to Visual Basic (Week 2)Introduction to Visual Basic (Week 2)
Introduction to Visual Basic (Week 2)
 
Chapter 01: Intro to VB2010 Programming
Chapter 01: Intro to VB2010 ProgrammingChapter 01: Intro to VB2010 Programming
Chapter 01: Intro to VB2010 Programming
 
Basic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfBasic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdf
 
Rancangan tahunan-ictl-form-2-2013
Rancangan tahunan-ictl-form-2-2013Rancangan tahunan-ictl-form-2-2013
Rancangan tahunan-ictl-form-2-2013
 
Vb unit t 1.1
Vb unit t 1.1Vb unit t 1.1
Vb unit t 1.1
 

More from AdiseshaK

Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdfAdiseshaK
 
SP_Solutions_-Adi.pdf
SP_Solutions_-Adi.pdfSP_Solutions_-Adi.pdf
SP_Solutions_-Adi.pdfAdiseshaK
 
CNS_Solutions-Adi.pdf
CNS_Solutions-Adi.pdfCNS_Solutions-Adi.pdf
CNS_Solutions-Adi.pdfAdiseshaK
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfAdiseshaK
 
INPUT OUTPUT MEMORY DEVICE.pdf
INPUT OUTPUT MEMORY DEVICE.pdfINPUT OUTPUT MEMORY DEVICE.pdf
INPUT OUTPUT MEMORY DEVICE.pdfAdiseshaK
 
Macros & Loaders sp.pdf
Macros & Loaders sp.pdfMacros & Loaders sp.pdf
Macros & Loaders sp.pdfAdiseshaK
 
COMPILER DESIGN.pdf
COMPILER DESIGN.pdfCOMPILER DESIGN.pdf
COMPILER DESIGN.pdfAdiseshaK
 
Introd to loaders_sp Adi.pdf
Introd to loaders_sp Adi.pdfIntrod to loaders_sp Adi.pdf
Introd to loaders_sp Adi.pdfAdiseshaK
 
Assembler by ADI.pdf
Assembler by ADI.pdfAssembler by ADI.pdf
Assembler by ADI.pdfAdiseshaK
 
C programming notes.pdf
C programming notes.pdfC programming notes.pdf
C programming notes.pdfAdiseshaK
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfAdiseshaK
 
VB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdfVB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdfAdiseshaK
 
WP Solutions- Adi.pdf
WP Solutions- Adi.pdfWP Solutions- Adi.pdf
WP Solutions- Adi.pdfAdiseshaK
 
TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfAdiseshaK
 
SP Solutions -Adi.pdf
SP Solutions -Adi.pdfSP Solutions -Adi.pdf
SP Solutions -Adi.pdfAdiseshaK
 
CNS Solutions-Adi.pdf
CNS Solutions-Adi.pdfCNS Solutions-Adi.pdf
CNS Solutions-Adi.pdfAdiseshaK
 
VB PPT by ADI PART2.pdf
VB PPT by ADI PART2.pdfVB PPT by ADI PART2.pdf
VB PPT by ADI PART2.pdfAdiseshaK
 
8085 microprocessor notes
8085 microprocessor notes8085 microprocessor notes
8085 microprocessor notesAdiseshaK
 
Introduction to 8085_by_adi_ppt
Introduction to 8085_by_adi_pptIntroduction to 8085_by_adi_ppt
Introduction to 8085_by_adi_pptAdiseshaK
 

More from AdiseshaK (20)

Introduction to Java Programming.pdf
Introduction to Java Programming.pdfIntroduction to Java Programming.pdf
Introduction to Java Programming.pdf
 
SP_Solutions_-Adi.pdf
SP_Solutions_-Adi.pdfSP_Solutions_-Adi.pdf
SP_Solutions_-Adi.pdf
 
CNS_Solutions-Adi.pdf
CNS_Solutions-Adi.pdfCNS_Solutions-Adi.pdf
CNS_Solutions-Adi.pdf
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 
INPUT OUTPUT MEMORY DEVICE.pdf
INPUT OUTPUT MEMORY DEVICE.pdfINPUT OUTPUT MEMORY DEVICE.pdf
INPUT OUTPUT MEMORY DEVICE.pdf
 
AI-ML.pdf
AI-ML.pdfAI-ML.pdf
AI-ML.pdf
 
Macros & Loaders sp.pdf
Macros & Loaders sp.pdfMacros & Loaders sp.pdf
Macros & Loaders sp.pdf
 
COMPILER DESIGN.pdf
COMPILER DESIGN.pdfCOMPILER DESIGN.pdf
COMPILER DESIGN.pdf
 
Introd to loaders_sp Adi.pdf
Introd to loaders_sp Adi.pdfIntrod to loaders_sp Adi.pdf
Introd to loaders_sp Adi.pdf
 
Assembler by ADI.pdf
Assembler by ADI.pdfAssembler by ADI.pdf
Assembler by ADI.pdf
 
C programming notes.pdf
C programming notes.pdfC programming notes.pdf
C programming notes.pdf
 
VB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdfVB PPT by ADI PART4.pdf
VB PPT by ADI PART4.pdf
 
VB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdfVB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdf
 
WP Solutions- Adi.pdf
WP Solutions- Adi.pdfWP Solutions- Adi.pdf
WP Solutions- Adi.pdf
 
TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdf
 
SP Solutions -Adi.pdf
SP Solutions -Adi.pdfSP Solutions -Adi.pdf
SP Solutions -Adi.pdf
 
CNS Solutions-Adi.pdf
CNS Solutions-Adi.pdfCNS Solutions-Adi.pdf
CNS Solutions-Adi.pdf
 
VB PPT by ADI PART2.pdf
VB PPT by ADI PART2.pdfVB PPT by ADI PART2.pdf
VB PPT by ADI PART2.pdf
 
8085 microprocessor notes
8085 microprocessor notes8085 microprocessor notes
8085 microprocessor notes
 
Introduction to 8085_by_adi_ppt
Introduction to 8085_by_adi_pptIntroduction to 8085_by_adi_ppt
Introduction to 8085_by_adi_ppt
 

Recently uploaded

Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfQucHHunhnh
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdfCarlosHernanMontoyab2
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...Nguyen Thanh Tu Collection
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptxJosvitaDsouza2
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportAvinash Rai
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfbu07226
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismDeeptiGupta154
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfYibeltalNibretu
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsparmarsneha2
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfjoachimlavalley1
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxbennyroshan06
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsCol Mukteshwar Prasad
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxRaedMohamed3
 

Recently uploaded (20)

Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdfINU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
INU_CAPSTONEDESIGN_비밀번호486_업로드용 발표자료.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
NCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdfNCERT Solutions Power Sharing Class 10 Notes pdf
NCERT Solutions Power Sharing Class 10 Notes pdf
 
Accounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdfAccounting and finance exit exam 2016 E.C.pdf
Accounting and finance exit exam 2016 E.C.pdf
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
plant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated cropsplant breeding methods in asexually or clonally propagated crops
plant breeding methods in asexually or clonally propagated crops
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 

VB PPT by ADI part-1.pdf

  • 2. Introduction to Introduction Visual Basic 6 Queries Visual Basic Features Visual Basic IDE 2 Visual Basic 6 Prof. K. Adisesha (Ph. D) User Interface
  • 3. Introduction Prof. K. Adisesha (Ph. D) 3 History of Programming Languages: Programming language - formal language used to give instructions to computers. ➢ Machine language ➢ Procedure-oriented languages ➢ Object-oriented languages ➢ Event-driven languages ➢ Natural languages
  • 4. Introduction Prof. K. Adisesha (Ph. D) 4 History of Programming Languages: Programming language - formal language used to give instructions to computers. ➢ Machine Language ❖ It is binary code, different for each computer processor ➢ Procedure-Oriented Languages ❖ FORTRAN ❖ COBOL ❖ Pascal ❖ C ❖ Ada
  • 5. Introduction Prof. K. Adisesha (Ph. D) 5 History of Programming Languages: Programming language - formal language used to give instructions to computers. ➢ Object-oriented languages ❖ Smalltalk ❖ C++ ❖ Ada 95 ➢ Event-driven languages ❖ Visual Basic ❖ most Visual languages ❖ Ada
  • 6. Introduction Prof. K. Adisesha (Ph. D) 6 History of Programming Languages: Programming language - formal language used to give instructions to computers. ➢ Natural languages ❖ computer will accept a user’s native or natural language, such as English ❖ Researchers continue to work in this area
  • 7. Visual Basic Prof. K. Adisesha (Ph. D) 7 Visual Basic-6: Visual Basic (VB) is a simple, modern, object-oriented and type-safe programming language. Visual Basic language has its roots in the family of C languages such as C, C++ and it is mostly similar to Java programming. ➢ Versions of Visual Basic ❖ 1992 - Visual Basic 1 for Windows 3 ❖ 1993 - Visual Basic 3.0 (a vast improvement over previous versions) ❖ 1995 - Visual Basic 4 - for Windows 95 ❖ 1996 - Visual Basic 5 - for Office 97 ❖ 1998 - Visual Basic 6 - for Windows 98 & Office 2000
  • 8. Visual Basic Prof. K. Adisesha (Ph. D) 8 ➢ Visual Basic Editions ❖ Learning Edition ❖ Professional Edition ❖ Enterprise Edition ➢ Other Visual Basic packaging options ❖ VBA (Visual Basic for Applications) ❖ Windows CE Toolkit for Visual Basic ❖ Visual Basic Scripting Edition ❖ Control Creation Edition
  • 9. Visual Basic Prof. K. Adisesha (Ph. D) 9 Visual Basic is a third-generation event-driven programming language first released by Microsoft in 1991. It evolved from the earlier DOS version called BASIC. ➢ BASIC means Beginners' All-purpose Symbolic Instruction Code. Features of Visual Basic: ❖ Full set of objects - you 'draw' the application ❖ Response to mouse and keyboard actions ❖ Full array of mathematical, string handling, and graphics functions ❖ Can handle fixed and dynamic variable and control arrays ❖ Sequential and random access file support ❖ Useful debugger and error-handling facilities ❖ Powerful database access tools ❖ ActiveX support ❖ Package & Deployment Wizard makes distributing your applications simple
  • 10. Visual Basic Prof. K. Adisesha (Ph. D) 10 Steps in Developing Application There are three primary steps involved in building a Visual Basic application. ❖ Draw the user interface ❖ Assign properties to controls ❖ Attach code to controls. Visual Basic operates in three modes. ❖ Design mode - used to build application ❖ Run mode - used to run the application ❖ Break mode - application halted and debugger is available
  • 11. Visual Basic Prof. K. Adisesha (Ph. D) 11 Visual Basic IDE ➢ After installing the vb6 compiler, the icon will appear on your desktop or in your programs menu. ➢ Click on the icon to launch the VB6 compiler. ➢ On start up, Visual Basic 6.0 will display the following dialog box as shown.
  • 12. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 12 ➢ Major windows ❖ Form Designer ❖ Form Layout ❖ Toolbox ❖ Project Explorer ❖ Object Browser ❖ Properties ❖ Code Editor ❖ Immediate, Locals, Watch
  • 13. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 13 Visual Basic IDE The 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.
  • 14. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 14 Visual Basic IDE- Menu bar
  • 15. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 15 Drawing the User Interface and Setting Properties: 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. ➢ There are two ways to place controls on a form: ❖ Double-click the tool in the toolbox and it is created with a default size on the form. You can then move it or resize it. ❖ Click the tool in the toolbox, then move the mouse pointer to the form window.
  • 16. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 16 Drawing the User Interface and Setting Properties: The Form Window is central to developing Visual Basic applications. It is where you draw your application.
  • 17. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 17 Drawing the User Interface and Setting Properties: ➢ Toolbox is the selection menu for controls used in your application. ➢ Form Layout Window shows where (upon program execution) your form will be displayed relative to your monitor’s screen:
  • 18. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 18 ➢ Toolbox is the selection menu for controls used in your application.
  • 19. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 19 ➢ Toolbox is the selection menu for controls used in your application.
  • 20. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 20 ➢ Toolbox is the selection menu for controls used in your application.
  • 21. Control Description Pointer Provides a way to move and resize the controls form PictureBox Displays icons/bitmaps and metafiles. It displays text or acts as a visual container for other controls. TextBox Used to display message and enter text. Frame Serves as a visual and functional container for controls CommandButton Used to carry out the specified action when the user chooses it. CheckBox Displays a True/False or Yes/No option. OptionButton OptionButton control which is a part of an option group allows the user to select only one option even it displays mulitiple choices. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 21 ➢ Toolbox is the selection menu for controls used in your application.
  • 22. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 22 ➢ Toolbox is the selection menu for controls used in your application. Control Description ListBox Displays a list of items from which a user can select one. ComboBox Contains a TextBox and a ListBox. This allows the user to select an ietm from the dropdown ListBox, or to type in a selection in the TextBox. HScrollBar and VScrollBar These controls allow the user to select a value within the specified range of values Timer Executes the timer events at specified intervals of time DriveListBox Displays the valid disk drives and allows the user to select one of them. DirListBox Allows the user to select the directories and paths, which are displayed. FileListBox Displays a set of files from which a user can select the desired one.
  • 23. Control Description Shape Used to add shape (rectangle, square or circle) to a Form Line Used to draw straight line to the Form Image used to display images such as icons, bitmaps and metafiles. But less capability than the PictureBox Data Enables the use to connect to an existing database and display information from it. OLE Used to link or embed an object, display and manipulate data from other windows based applications. Label Displays a text that the user cannot modify or interact with. Shape Used to add shape (rectangle, square or circle) to a Form Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 23 ➢ Toolbox is the selection menu for controls used in your application.
  • 24. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 24 Drawing the User Interface and Setting Properties: 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 ❖ Categorized ➢ Under this box are the available properties for the currently selected object.
  • 25. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 25 Drawing the User Interface and Setting Properties: Properties Window is used to establish initial property values for objects. ➢ Properties define the characteristics of an object such as Size, Color etc. or sometimes the way in which it behaves. ➢ For example, a TextBox accepts properties such as: ❖ Enables property: allows the TextBox to be enabled or disabled at run time depending on the condition set to True or False. ❖ Font property: sets a particular font in the TextBox. ❖ MultiLine property: allows the TextBox to accept and display multiple lines at run time. ❖ Text property: of the TextBox control sets a particular text in the control. ❖ Visible property: is used to hide the object at run time. ❖ Width property: sets the TextBox to the desired width at design time.
  • 26. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 26 Drawing the User Interface and Setting Properties: Properties Window is used to establish initial property values for objects. ➢ A very important property for each object is its name. The name is used by Visual Basic to refer to a particular object in code. ➢ A convention has been established for naming Visual Basic objects. ➢ A few of the prefixes are:
  • 27. Visual Basic 6- Events Prof. K. Adisesha (Ph. D) 27 Events: are basically a user action like key press, clicks, mouse movements, etc., or some occurrence like system generated notifications. Applications need to respond to events when they occur. ➢ The combination of controls name and event's name is unique and is the name of the event handler. ➢ The general syntax of event handler is Private sub controlname.cntrolname_eventname () End sub ➢ There are mainly three types of events − ❖ Mouse events ❖ Keyboard events ❖ Focus Events
  • 28. Visual Basic 6- Events Prof. K. Adisesha (Ph. D) 28 The Mouse events: ➢ Click :This event takes place when user clicks the mouse button once Example : Private Sub Form1_Click() Form1.print “click event is occur” End Sub ➢ DblClick : The Double click event is called when user clicks the Mouse buttons Twice. Example : Private Sub Form1_DblClick() Form1.print “Double click event is occur” End Sub ➢ MouseDown : The MouseDown event is called when user presses the Mouse buttons down Example : Private Sub Form1_MouseDown() Form1.print “Mouse Down event is occur” End Sub
  • 29. Visual Basic 6- Events Prof. K. Adisesha (Ph. D) 29 The Mouse events: ➢ MouseUp :The MouseUp event is called when user presses the Mouse buttons up Example : Private Sub Form1_MouseUp() Form1.print “Mouse Up event is occur” End Sub ➢ MouseMove: The MouseMove event is called when user Moves the Mouse over Form. Example : Private Sub Form1_MouseMove() Form1.print “Mouse Move event is occur”” End Sub
  • 30. Visual Basic 6- Events Prof. K. Adisesha (Ph. D) 30 The Keyboard events: ➢ KeyDown: The KeyDown event is called when user presses the KeyBoard buttons down Example : Private Sub Form1_KeyDown() Form1.print “KeyDown event is occur” End Sub ➢ KeyUp :The KeyUp event is called when user presses the Mouse buttons up. Example : Private Sub Form1_KeyUp() Form1.print “Key Up event is occur” End Sub ➢ Change :The change event is triggered by various controls when their contents change. Example : Private Sub Text1_Change() End Sub
  • 31. Visual Basic 6- Events Prof. K. Adisesha (Ph. D) 31 The Focus event: Focus is the ability of a control to receive user input via keyboard. When an object has the focus, it can receive input from a user. ➢ These are related events, when the focus is move on one control to the other. ❖ SetFocus : Event occurs when user can change the focus from one control to other. ❖ GotFocus : GotFocus event to initialize a control for editing. Private Sub Text1_GotFocus () Text1.text= “event is occur” End Sub ❖ LostFocus : LostFocus event to validate the data entered by the use. Private Sub Text1_LostFocus () Text2.setFocus End Sub
  • 32. Event Occurrence Change The user modifies text in a combo box or text box. Click The user clicks the primary mouse button on an object. DblClick The user double-clicks the primary mouse button on an object. DragDrop The user drags an object to another location. DragOver The user drags an object over another control. GotFocus An object receives focus. KeyDown The user presses a keyboard key while an object has focus. Visual Basic 6- Events Prof. K. Adisesha (Ph. D) 32 ➢ Events: are what happen in and around your program. These events occur as a result of some specific user action, such as moving the mouse, pressing a key on the keyboard, or clicking a text box.
  • 33. Event Occurrence KeyPress The user presses and releases a keyboard key while an object has focus. KeyUp The user releases a keyboard key while an object has focus. LostFocus An object loses focus. MouseDown The user presses any mouse button while the mouse pointer is over an object. MouseMove The user moves the mouse pointer over an object. MouseUp The user releases any mouse button while the mouse pointer is over an object. Visual Basic 6- Events Prof. K. Adisesha (Ph. D) 33 ➢ Events: are what happen in and around your program. These events occur as a result of some specific user action, such as moving the mouse, pressing a key on the keyboard, or clicking a text box.
  • 34. Visual Basic 6 IDE Prof. K. Adisesha (Ph. D) 34 Example: Program to find sum and average of two numbers
  • 35. Discussion Prof. K. Adisesha (Ph. D) 35 Queries ? Prof. K. Adisesha 9449081542