Introduction to Visual Basic and the VB IDE - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Introduction to Visual Basic and the VB IDE

Description:

Easily develop interface prototypes. Accelerates delivery of system ... I need a place to store the average. avg isoftype Num // calc the average ... – PowerPoint PPT presentation

Number of Views:186
Avg rating:3.0/5.0
Slides: 17
Provided by: jonapr
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Visual Basic and the VB IDE


1
Introduction to Visual Basicand the VB IDE
2
Motivation
  • We'd like to be able to write programs that will
    run on Windows
  • We'd like to use Rapid Application Development
    methods
  • Were interested in developing object-oriented,
    event-driven applications

3
Basic
  • 10 sum 0
  • 20 FOR i 1 to 100
  • 30 sum sum i
  • 40 NEXT i
  • 50 avg sum / 100
  • 60 PRINT "The average is " avg
  • 70 END

4
RAD
  • Rapid Application Development
  • Easily develop interface prototypes
  • Accelerates delivery of system
  • Better user feedback and testing
  • WYSISYG development

5
Object-oriented Programming
  • Think in real-world concepts
  • Objects have
  • Properties/attributes (nouns)
  • Actions/events (verbs)
  • Akin to a "record" on steroids! ?
  • Groups data and procedural abstraction together
  • Provides for encapsulation information hiding

6
Event-Driven Programming
  • Basic and Pseudocode run from top to bottom
  • Main program/algorithm in control
  • Event-driven programs respond to events
  • Usually graphical (forms, buttons, controls)
  • Instructions are executed in response to events
  • Button press, control change, form close, etc.

7
Anatomy of a VB Program
Form
Controls
User clicks on the cmdBorder button
A Click() event is generated
The cmdBorder_Click() method is executed
8
Event-drivenvs. Procedural
algorithm CalcAges // create the 4 age
variables Age1, Age2, Age3, Age4 isoftype Num
// prompt the user and then read in the //
numbers print("Please enter 4 ages")
read(Age1, Age2, Age3, Age4) // I need a
place to store the average avg isoftype Num
// calc the average avg lt- (Age1 Age2
Age3 Age4) / 4 // display it back to the
user print("The average age is ", avg)
endalgorithm
9
VB Program Development
  • Design
  • Create the User Interface (UI)
  • Set form and control properties
  • Code event handlers
  • Save and test/debug your program often!
  • Create executable file
  • Create setup program(for deployment on other
    computers)

10
The VB IDE
Project Explorer
Form Designer
Toolbar
Properties Editor
Code Editor
11
Design vs. Run Time
  • Design time
  • When youre building your program
  • Some properties may not be set
  • Run time
  • When you run your program
  • Events are generated from user (buttons, etc.)
  • Opens up more properties of controls

12
Versions and Editions
  • Visual Basic has evolved and will continue to
    evolve
  • Were using VB 6.0 (from Visual Studio 6.0
    Enterprise)
  • VB7.0 (or VB.Net) is forthcoming and in BETA now
  • Different levels/editions available
  • Learning (standard controls, samples, ADO DB
    support)
  • Professional (additional controls,
    Internet/client-server)
  • Enterprise (SourceSafe, IIS, SQL)

13
File Types
  • VBP Visual Basic Project (meta file)
  • VBW Visual Basic Workspace (settings of
    project)
  • FRM Form (form, control, methods, attributes)
  • EXE Self-contained executable program
  • SCC Visual SourceSafe file (for
    versioning/collaboration)
  • others to be announced as needed

14
MSDN
  • Microsoft Developers Network
  • Your lifeline
  • Your best friend when programming
  • On-line or on CD-Rom
  • http//www.msdn.microsoft.com
  • Mouse over Libraries and click MSDN
    Libraries
  • Live it Love it Use it!

15
Summary
  • VB is based on Basic
  • VB is a RAD language
  • VB is an event-driven language
  • VB is an object-oriented language
  • VB comes in different versions and editions
  • Important terms to know/understand
  • Form, control, method, event, attribute/property
  • IDE, RAD, OOP

16
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com