SlideShare a Scribd company logo
Introduction to Visual Basic Visual   B eginners  A ll-Purpose  S ymbolic  I nstruction  C ode
Visual Basic is a tool that allows you to develop Windows (Graphic User Interface -  GUI ) applications . is  event-driven ,   meaning code remains idle until called upon to respond to some event.
Steps in Developing Application 1. Draw the user interface 2. Assign properties to controls 3. Attach code to controls
Draw the User Interface 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
Getting Started
7 Windows Main Window Form Window Toolbox Properties Window  Form Layout Window Project Window Code Editor Window
Main Window consists of the title bar, menu bar, and toolbar.
Form Window is central to developing Visual Basic applications. It is where you draw your application.
Toolbox is the selection menu for controls used in your application.
Properties Window is used to establish initial property values for objects.
Form Layout Window shows where (upon program execution) your form will be displayed relative to your monitor’s screen.
Project Window displays a list of all forms and modules making up your application.
Code Editor Window Contains the actual Basic coding.
Assign Properties to Controls Naming Convention of Controls Object Prefix Example Form frm frmHello Command Button cmd, btn cmdExit, btnStart Label lbl lblStart, lblEnd TextBox txt txtTime, txtName Menu mnu mnuExit, mnuSave Check box chk chkChoice
Attach Code to Controls Code in a Visual Basic application is divided into smaller blocks called  procedures. Event procedure syntax:  object name_event  () Ex. Command1_Click ()
Private Sub  object name_event  () End Sub  _______________________________________  Private Sub Command1_Click () End Sub
Private Sub Command1_Click () object name.property  =  value End Sub _______________________________________ Private Sub Command1_Click () Text1.Text = "Hello, world!" End Sub
Variables Rules used in naming variables: No more than 40 characters. They may include letters, numbers, and underscore (_). The first character must be a letter. You cannot use a reserved word.
Data Types
Variable Declaration 1. Default (variant) 2. Implicit Amount% = 300 3. Explicit four levels of scope Procedure level Procedure level, static Form and module level Global level
Procedure level Dim   Variable name   as   Data type Ex. Dim Myint as integer Procedure level, static Static   Variable name   as   Data type Ex. Dim Myint as integer
Form and module level Dim   Variable name   as   Data type Ex. Dim Myint as integer Global level Global   Variable name   as   Data type Ex. Dim Myint as integer
 
Procedure Routine1 has access to __, __, and __(…..) Procedure Routine2 has access to __, __, and __(…..) Procedure Routine3 has access to __, __, and __(…..)
Procedure Routine1 has access to X, Y, and A (loses value upon termination) Procedure Routine2 has access to X, Y, and B (retains value) Procedure Routine3 has access to X, Z, and C (loses value)
 

More Related Content

PPT
Vb introduction.
PPT
Visual basic
PDF
Visual Basic IDE Introduction
PDF
Visual Basic 6.0
PPT
Microsoft visual basic 6
PPT
Visual Basic menu
PPT
Visual basic
PPTX
Html form tag
Vb introduction.
Visual basic
Visual Basic IDE Introduction
Visual Basic 6.0
Microsoft visual basic 6
Visual Basic menu
Visual basic
Html form tag

What's hot (20)

PPTX
Software Cost Estimation Techniques
PPT
Visual basic ppt for tutorials computer
PPTX
PPTX
introduction to visual basic PPT.pptx
DOCX
Software quality management lecture notes
PPT
RichControl in Asp.net
PPTX
Visual Basic Controls ppt
PPTX
Variable and constants in Vb.NET
PPT
Introduction to Rational Rose
PPTX
Introduction to Visual Basic 6.0 Fundamentals
PDF
VB.Net-Controls and events
PPT
Computer Organization and Assembly Language
PDF
Visual basic 6.0
PPTX
Lecture 1 introduction to vb.net
PPTX
Phased life cycle model
ODP
Introduction of Html/css/js
PPTX
Decomposition technique In Software Engineering
PPTX
Algorithmic Software Cost Modeling
PPT
Js ppt
PPTX
An Overview of HTML, CSS & Java Script
Software Cost Estimation Techniques
Visual basic ppt for tutorials computer
introduction to visual basic PPT.pptx
Software quality management lecture notes
RichControl in Asp.net
Visual Basic Controls ppt
Variable and constants in Vb.NET
Introduction to Rational Rose
Introduction to Visual Basic 6.0 Fundamentals
VB.Net-Controls and events
Computer Organization and Assembly Language
Visual basic 6.0
Lecture 1 introduction to vb.net
Phased life cycle model
Introduction of Html/css/js
Decomposition technique In Software Engineering
Algorithmic Software Cost Modeling
Js ppt
An Overview of HTML, CSS & Java Script
Ad

Viewers also liked (7)

PPT
Introduction to visual basic programming
DOCX
INTRO TO VISUAL BASIC
PPT
visual basic for the beginner
PPTX
History of Visual Basic Programming
PPT
Meaning Of VB
PPTX
Chapter 1 — Introduction to Visual Basic 2010 Programming
PPTX
Basic controls of Visual Basic 6.0
Introduction to visual basic programming
INTRO TO VISUAL BASIC
visual basic for the beginner
History of Visual Basic Programming
Meaning Of VB
Chapter 1 — Introduction to Visual Basic 2010 Programming
Basic controls of Visual Basic 6.0
Ad

Similar to visual basic v6 introduction (20)

PPTX
Vb6.0 intro
PDF
Visual basic
DOCX
Vb lecture
PPTX
Presentation on visual basic 6 (vb6)
PDF
Vb 6ch123
PPT
Visual basics
PPTX
UNIT - 1 VISUAL BASIC PRESENTATION FOR IT
PPT
Vb basics
DOC
Practicalfileofvb workshop
PPTX
Introduction to Visual Basic Programming
PPTX
COM 211 PRESENTATION.pptx
PDF
Visualbasic tutorial
PPS
Vb6.0 Introduction
DOCX
Visual basic concepts
PPTX
Introduction to visual basic 6 (1)
PPT
Visual basic 6.0
PPT
Vb unit t 1.1
PDF
vb-160518151614.pdf
PPTX
vb-160518151614.pptx
PPTX
vb.pptx
Vb6.0 intro
Visual basic
Vb lecture
Presentation on visual basic 6 (vb6)
Vb 6ch123
Visual basics
UNIT - 1 VISUAL BASIC PRESENTATION FOR IT
Vb basics
Practicalfileofvb workshop
Introduction to Visual Basic Programming
COM 211 PRESENTATION.pptx
Visualbasic tutorial
Vb6.0 Introduction
Visual basic concepts
Introduction to visual basic 6 (1)
Visual basic 6.0
Vb unit t 1.1
vb-160518151614.pdf
vb-160518151614.pptx
vb.pptx

visual basic v6 introduction

  • 1. Introduction to Visual Basic Visual B eginners A ll-Purpose S ymbolic I nstruction C ode
  • 2. Visual Basic is a tool that allows you to develop Windows (Graphic User Interface - GUI ) applications . is event-driven , meaning code remains idle until called upon to respond to some event.
  • 3. Steps in Developing Application 1. Draw the user interface 2. Assign properties to controls 3. Attach code to controls
  • 4. Draw the User Interface 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
  • 6. 7 Windows Main Window Form Window Toolbox Properties Window Form Layout Window Project Window Code Editor Window
  • 7. Main Window consists of the title bar, menu bar, and toolbar.
  • 8. Form Window is central to developing Visual Basic applications. It is where you draw your application.
  • 9. Toolbox is the selection menu for controls used in your application.
  • 10. Properties Window is used to establish initial property values for objects.
  • 11. Form Layout Window shows where (upon program execution) your form will be displayed relative to your monitor’s screen.
  • 12. Project Window displays a list of all forms and modules making up your application.
  • 13. Code Editor Window Contains the actual Basic coding.
  • 14. Assign Properties to Controls Naming Convention of Controls Object Prefix Example Form frm frmHello Command Button cmd, btn cmdExit, btnStart Label lbl lblStart, lblEnd TextBox txt txtTime, txtName Menu mnu mnuExit, mnuSave Check box chk chkChoice
  • 15. Attach Code to Controls Code in a Visual Basic application is divided into smaller blocks called procedures. Event procedure syntax: object name_event () Ex. Command1_Click ()
  • 16. Private Sub object name_event () End Sub _______________________________________ Private Sub Command1_Click () End Sub
  • 17. Private Sub Command1_Click () object name.property = value End Sub _______________________________________ Private Sub Command1_Click () Text1.Text = "Hello, world!" End Sub
  • 18. Variables Rules used in naming variables: No more than 40 characters. They may include letters, numbers, and underscore (_). The first character must be a letter. You cannot use a reserved word.
  • 20. Variable Declaration 1. Default (variant) 2. Implicit Amount% = 300 3. Explicit four levels of scope Procedure level Procedure level, static Form and module level Global level
  • 21. Procedure level Dim Variable name as Data type Ex. Dim Myint as integer Procedure level, static Static Variable name as Data type Ex. Dim Myint as integer
  • 22. Form and module level Dim Variable name as Data type Ex. Dim Myint as integer Global level Global Variable name as Data type Ex. Dim Myint as integer
  • 23.  
  • 24. Procedure Routine1 has access to __, __, and __(…..) Procedure Routine2 has access to __, __, and __(…..) Procedure Routine3 has access to __, __, and __(…..)
  • 25. Procedure Routine1 has access to X, Y, and A (loses value upon termination) Procedure Routine2 has access to X, Y, and B (retains value) Procedure Routine3 has access to X, Z, and C (loses value)
  • 26.