• Like
  • Save
visual basic v6 introduction
Upcoming SlideShare
Loading in...5
×
 

visual basic v6 introduction

on

  • 2,194 views

 

Statistics

Views

Total Views
2,194
Views on SlideShare
2,192
Embed Views
2

Actions

Likes
4
Downloads
207
Comments
1

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    visual basic v6 introduction visual basic v6 introduction Presentation Transcript

    • 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)
    •