1 Chapter 1 Introduction to Visual Basic Programming

1 Chapter 1 Introduction to Visual Basic Programming and Applications By Carlotta Eaton Exploring MS Visual Basic 6 Exploring Microsoft Visual Basic 6. 0 Copyright 1999 Prentice-Hall, Inc. © 1999 Prentice-Hall, Inc.

Objectives Ø Machine language vs. . High-level language Ø Procedure-oriented, object-oriented, and event-driven languages Ø Background of Visual Basic Ø VB Integrated Development Environment Ø Online documentation and Help features Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 2

Application Programs Program - detailed set of instructions for a computer to execute Application programs (applications or apps) self-contained collection of programs that perform a task for the end user Programming language - formal language used to give instructions to computers Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 3

History of Programming Languages Ø Machine language Ø Procedure-oriented languages Ø Object-oriented languages Ø Event-driven languages Ø Natural languages Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 4

History of Programming Languages Ø Machine Language n different for each computer processor Ø Procedure-Oriented Languages n n n FORTRAN COBOL Pascal C Ada Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 5

History of Programming Languages Ø Object-oriented languages n Smalltalk n C++ n Ada 95 Ø Event-driven languages n Visual Basic n most Visual languages Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 6

History of Programming Languages Ø Natural languages n computer will accept a user’s native or natural language, such as English n Researchers continue to work in this area Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 7

Background of Visual Basic Ø BASIC n Beginner’s All-purpose Symbolic Instruction Code n By John Kemeny and Thomas Kurtz n Designed to teach programming to beginners n BASIC language interpreter, one of Microsoft’s first products Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 8

Background of Visual Basic Ø BASIC Included with DOS n QBASIC - included with DOS Version 5 - subset of BASIC n Ø Visual Basic 1992 - Visual Basic 1 for Windows 3 n Visual Basic 4 - for Windows 95 n Visual Basic 5 - for Office 97 n Visual Basic 6 - for Windows 98 & Office 2000 n Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 9

Visual Basic 5 Interactive Development Environment Project Explorer Toolbox Form Designer Window Properties window Code Editor Window Form Layout Window Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 10

Elements of the Integrated Development Environment Ø Application icon Ø Major windows n Form Designer Ø Application name n Form Layout Ø Context menus n Toolbox Ø Controls n Project Explorer Ø Current project n Object Browser Ø Design view mode n Properties Ø Title bar n Code Editor n Exploring MS Visual Basic 6 Immediate, Locals, Watch Copyright 1999 Prentice-Hall, Inc. 11

Introduction to Visual Basic Hands-On Exercise 1 n Start Microsoft Visual Basic 5. 0 n Open the Welcome Project n Open the Welcome Form n Run the Welcome Project n End the Welcome Project n Exit Visual Basic Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 12

Summary. . . Ø Event-driven languages is a major improvement in programming languages Ø Editions include Learning Edition, Professional Edition, and Enterprise Edition Ø CD-ROM includes the MSDN Library, and many sample programs Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 13

Summary Ø Integrated Development Environment includes Form Designer, Form Layout n Code Edition, Project Explorer n Properties and Object Browser n Ø Choose the right tool for the job Ø Visual Basic is the glue that binds Windows objects together Exploring MS Visual Basic 6 Copyright 1999 Prentice-Hall, Inc. 14
- Slides: 14