chapter 1 introduction to visual basic programming and applications 1 exploring microsoft visual...

25
Chapter 1 Introduction to Visual Basic Programmin g and Applicatio ns 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, By Carlotta Eaton

Upload: marlon-moorefield

Post on 01-Apr-2015

214 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Chapter 1Introduction to

Visual BasicProgrammin

g and Applications

1

Exploring Microsoft Visual Basic 6.0Copyright © 1999 Prentice-Hall, Inc.

By Carlotta Eaton

Page 2: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 2

Objectives

Machine language vs.. High-level language

Procedure-oriented, object-oriented, and event-driven languages

Background of Visual BasicVB Integrated Development

EnvironmentOnline documentation and Help features

Page 3: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 3

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

Page 4: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 4

History of Programming Languages

Machine languageProcedure-oriented languagesObject-oriented languagesEvent-driven languagesNatural languages

Page 5: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 5

History of Programming Languages

Machine Language different for each computer processor

Procedure-Oriented Languages FORTRAN COBOL Pascal C Ada

Page 6: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 6

History of Programming Languages

Object-oriented languages Smalltalk C++ Ada 95

Event-driven languages Visual Basic most Visual languages

Page 7: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 7

History of Programming Languages

Natural languages computer will accept a user’s native

or natural language, such as English Researchers continue to work in this

area

Page 8: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 8

Background of Visual Basic

BASIC Beginner’s All-purpose Symbolic

Instruction Code By John Kemeny and Thomas Kurtz Designed to teach programming to

beginners BASIC language interpreter, one of

Microsoft’s first products

Page 9: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 9

Background of Visual Basic

BASIC Included with DOS QBASIC - included with DOS Version 5 -

subset of BASIC

Visual Basic 1992 - Visual Basic 1 for Windows 3 Visual Basic 4 - for Windows 95 Visual Basic 5 - for Office 97 Visual Basic 6 - for Windows 98 & Office 2000

Page 10: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 10

Visual Basic Editions

Learning EditionProfessional EditionEnterprise EditionIncluded in Visual Studio suite

(analogy Office for programmers)

Page 11: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 11

Visual Basic Editions

Other Visual Basic packaging options VBA (Visual Basic for Applications) Windows CE Toolkit for Visual Basic Visual Basic Scripting Edition Control Creation Edition

Page 12: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 12

Toolbox

Form Designer Window

Code Editor Window

Project Explorer

Properties window

Form Layout Window

Visual Basic 6 Interactive Development Environment

Page 13: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 13

Elements of the Integrated Development Environment

Application iconApplication nameContext menusControlsCurrent projectDesign view modeTitle bar

Major windows Form Designer Form Layout Toolbox Project Explorer Object Browser Properties Code Editor Immediate, Locals, Watch

Page 14: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 14

Introduction to Visual Basic

Hands-On Exercise 1 Start Microsoft Visual Basic 6.0 Open the Welcome Project Open the Welcome Form Run the Welcome Project End the Welcome Project Exit Visual Basic

Page 15: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 15

Get Help When You Need It

MSDN LibraryMicrosoft on the WebLearning Edition of Visual Basic 6.0

Visual Basic 6.0 in Action book Learn Visual Basic Now multimedia

tutorial

Page 16: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 16

MSDN Library

Topic PaneNavigation Pane

Page 17: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 17

MSDN Library

Visual Basic Documentation Documentation Map What’s New Programmer’s Guide Samples Reference Guidebooks Component Tools Guide Data Access Guide

Page 18: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 18

Get Help from the CD

Hands-On Exercise 2 Open the Calc Sample Application Run the Calc Sample Application Get Help from the MSDN Library Add a Topic to the Favorites List Search for a Definition Exit Help and Visual Basic

Page 19: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 19

Help from the Web

Pull down Help menuSelect Help from the Web

or www.microsoft.com/vbasic

Page 20: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 20

Get Help from the Web

Hands-On Exercise 3 Use the Free Stuff Page to Update VB Install the Update (optional) Product News Frequently Asked Questions Online Support

Page 21: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 21

Use the Right Tool for the Job

Microsoft Office Suite Word - word processing Excel - spreadsheet PowerPoint - presentation Access - database

OLE = Object Linking and Embedding

Use Visual Basic to create a specialized, customized application

Page 22: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 22

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

Page 23: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 23

Summary

Integrated Development Environment includes Form Designer, Form Layout Code Edition, Project Explorer Properties and Object Browser

Choose the right tool for the jobVisual Basic is the glue that binds

Windows objects together

Page 24: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 24

Practice with Visual Basic

1. Automated Teller Machine2. Personal News Service3. Getting Assistance While You

Work4. Pricing Information

Page 25: Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta

Exploring MS Visual Basic 6

Copyright 1999 Prentice-Hall, Inc. 25

Case Studies

I Wish I CouldVisual Basic Help on the WebQuick Reference ManualPlanning for Disaster