a tour of visual basic bacs 287. early history of basic beginners all-purpose symbolic instruction...

13
A Tour of Visual Basic BACS 287

Upload: phebe-davidson

Post on 20-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

A Tour of Visual Basic

BACS 287

Page 2: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Early History of Basic

Beginners All-Purpose Symbolic Instruction Code -- 1963

An “Interpreted” teaching language English-like syntax Originally unstructured Relatively slow execution Easy to learn and use

Page 3: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Modern Basic

Several generations (GW-Basic, QuickBasic, QBasic... Visual Basic)

Structured, interpreted language Compiled executables Object-Oriented Based upon GUI forms Relatively easy to learn Somewhat slow execution (compared to

some other languages)

Page 4: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Visual Basic Strengths

Relatively easy to learn Rapid Application Development (RAD) Easy maintenance Can be combined with other tools (C#,

Access, SQL Server,...) Is becoming an industry standard Can be used to create advanced integrated

applications

Page 5: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Visual Basic Weaknesses

Has some technical limitations that make it less suitable for professional applications than other languages

Tends to create code that is not as efficient as can be created with other languages

Page 6: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Parts of the Screen

Menu Bar Tool Bar Tool Box Solution explorer Class View window Form(s) Properties window Form designer window

Page 7: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Steps in Building a VB Program

Plan what you want to do– Pseudocode– Flowchart

Build the program– Create the Interface– Set the Properties– Write the Code

Test & debug Distribute & Support

Page 8: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Details on “Building the Program”

The interface defines the interaction between the user and the program

The properties determine how the controls (objects) act to events

Code is procedural logic that tells the computer to do things when events happen

Page 9: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Details on “Building the Program

Code can be stored:– Associated with control events– “Behind the form”– In stand-alone code modules

For now, think of the code as a way to modify the default functionality of controls

Page 10: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Form Design Basics

Simple is better– Do not overuse graphics– Avoid overuse of 3D effects– Use logical icons where appropriate

Be contestant– Buttons (size, color, text, function,…)– Layout– Color scheme– Prompts, ...

Page 11: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Form Design Basics

Layout data logically– Top-to-bottom– Left-to-right– Group logically related items– Use blank space effectively

Layout controls logically– Put like controls together– Segregate “dangerous” controls– Use frame containers for visual connection

Page 12: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Form Design Basics

Use the proper control for the task– Option buttons for mutually exclusive– Check buttons when several possible– Read-only list box when selection limited,...

Use form space wisely– Drop-down combo boxes– Drop-down list boxes– Scrolling grid boxes– Tab control for multi-forms, ...

Page 13: A Tour of Visual Basic BACS 287. Early History of Basic Beginners All-Purpose Symbolic Instruction Code -- 1963 An “Interpreted” teaching language English-like

BACS 287

Form Design Basics

Use color wisely– Gray and pastel colors for backgrounds– Use bright colors sparingly– Do not use color where it is not needed

Make form flow logical– Available options should be logical– Complex menu selections should be avoided