Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

26
Chapter 1- Visual Basic Schneider 1 Chapter 1 An Introduction to Computers and Visual Basic

Transcript of Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Page 1: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 1

Chapter 1

An Introduction to Computers and Visual Basic

Page 2: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 2

Outline and Objective

–Introduction to Computers–Using Windows–Disk and Folders

–An Introduction to Visual Basic

Page 3: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 3

Parts of a Computer System:

• Hardware: Electronic Devices & Circuits

• Software: Instructions or Computer Programs

Page 4: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 4

Main components of Hardware:

• Input : Keyboard & Mouse• System unit: Central Processing Unit (CPU) &

Memory

• Output: Monitor

• Secondary Storage: Disk Drive

Page 5: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 5

Central Processing Unit (CPU):

• Control Unit (CU)

• Arithmetic Logic Unit (ALU)

Page 6: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 6

Control Unit (CU):

• Directs the order in which commands are executed.

• Communicates with input and output devices.

• Transfers data to and from the primary storage unit and various input and output devices.

Page 7: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 7

Arithmetic Logic Unit (ALU)

• Performs calculations (adds, subtracts, multiplies, divides)

• Makes logical comparisons (=, <>, <, >, <=, >=)

Page 8: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 8

Memory:

• Memory is a Temporary Storage

Page 9: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 9

Types of Memory:

• Random Access Memory (RAM)

• Read Only Memory (ROM)

Page 10: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 10

Random Access Memory (RAM)

• Stores program instructions and data needed for processing.

• Stores intermediate and final results of processing.

• It is volatile.

Page 11: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 11

What is a Bit?

• Computers use binary system to process data.• The smallest unit of computer memory is bit.• A bit is basically an on/off switch and is usually

described as a 1 or 0.

Page 12: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 12

What is a Byte?

• A byte is a pattern of 8 bits.

• A byte is also called a character.

• Additional units of memory are defined by powers of 2.

Page 13: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 13

Software:

• Instructions for the hardware.

• A collection of lines of instruction is called a Program.

Page 14: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 14

Types of Software:

• System Software

• Application Software

Page 15: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 15

System Software (Operating System):

• Is the interface between you and hardware.

• Is the interface between application software and hardware.

Page 16: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 16

Examples of System Software:

• UNIX

• MS-DOS

• Windows 98 / NT/ 7

Page 17: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 17

Examples of Application Software:

• Word Processing

• Spreadsheet

• Accounting

• Programming Languages: Visual Basic, C++, Pascal

Page 18: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 18

Using Windows

• Basic techniques to use the mouse:– Pointing– Clicking– Dragging– Double-Clicking

Page 19: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 19

Key Terms in using Windows

• Title Bar

• Active window

• Dragging a window

Page 20: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 20

Using Windows

– Reviewing Notepad to learn more about Windows application

– Notepad is an item in the Accessories menu

Page 21: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 21

Disks & Folders:

• Disk is a permanent storage. • Disk management is handled by the Operating

System.• A disk can store thousands of files.• To organize your files you have to store them in

different folders (directories).

Page 22: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 22

Key Terms in using Folders

• Root folder

• Path Example:

A:\Temp\MyProjects\project1.vbp

• File Specification: You should always know where you are saving your files.

Page 23: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 23

History of Visual Basic:

• BASIC stands for Beginner’s All-purpose Symbolic Instruction Code.

• Developed by John Kemeny and Thomas Kurtz in mid-1960s.

• Visual Basic was developed in mid-1991 by the Microsoft Corporation.

Page 24: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 24

Introduction to Visual Basic:

• Language used to create windows application.

• Provides a Graphical User Interface or GUI.

• The sequence of instructions executed in the program is controlled by events.

Page 25: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 25

Terminology used in Visual Basic:

• Forms

• Controls

• Objects

• Properties

• Events

Page 26: Chapter 1- Visual Basic Schneider1 Chapter 1 An Introduction to Computers and Visual Basic.

Chapter 1- Visual Basic Schneider 26

Steps to Design a Visual Basic Application

• Decide on the Interface for the user.

(Forms & Controls)• Determine which events the objects on the

window should recognize.• Write the events procedures for those events.