Introduction EYAD ALSHAREEF www.just.edu.jo/~eyad
Outline and Objective Introduction to Computers Understanding the window layout Introduction to Visual Basic
What is a Computer? • Device • Computations : addition, multiplication • Making Logical Decisions : comparisons • Very High Speed:millions faster than human beings
Computer Organization • Hardware: Electronic Devices & Circuits • Software: Instructions or Computer Programs
Six logical units of computer • Input unit • “Receiving” section • Obtains information from input devices • Keyboard, mouse, microphone, scanner, networks, … • Output unit • “Shipping” section • Takes information processed by computer • Places information on output devices • Screen, printer, networks, … • Information used to control other devices
Six logical units of computer • Memory unit • Rapid access, relatively low capacity “warehouse” section • Retains information from input unit • Immediately available for processing • Retains processed information • Until placed on output devices • Memory, primary memory • Arithmetic and logic unit (ALU) • “Manufacturing” section • Performs arithmetic calculations and logic decisions
Six logical units of computer • Central processing unit (CPU) • “Administrative” section • Supervises and coordinates other sections of computer • Secondary storage unit • Long-term, high-capacity “warehouse” section • Storage • Inactive programs or data • Secondary storage devices • Disks • Longer to access than primary memory • Less expensive per unit than primary memory
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.
Memory • Memory is a Temporary Storage
Types of Memory • Random Access Memory (RAM) • Read Only Memory (ROM)
Random Access Memory(RAM) • Stores program instructions and data needed for processing. • Stores intermediate and final results of processing. • It is volatile.
Software • Instructions for the hardware. • A collection of lines of instruction is called: Program
Types of Software • System Software • Application Software
System Software(Operating System) • Is the interface between you and hardware. • Is the interface between application software and hardware.
Examples of System Software • UNIX • MS-DOS • Windows 98 / NT
Examples of Application Software • Word Processing • Spreadsheet • Accounting • Programming Languages: Visual Basic, C++, Pascal
Window Layout • Reviewing Notepad to learn more about windows layout • Notepad is an item in the Accessories menu
Notepad Window Title bar Menu bar Vertical scroll bar Work area Horizontal scroll bar Scroll box Scroll arrow
Notepad Window • Title bar Maximize button Control-menu box Title Text Minimize button Close button
Notepad Window A menu and its options
Notepad Window Save As Dialog Box
Notepad Window Message Box
History of Visual Basic • Uses the BASIC language • VB was developed by the Microsoft Corporation • Version 1.0 released in May of 1991 • Version 2.0 was released in October of 1992 • Version 3.0 was released in May of 1993 • Version 4.0, released in September of 1995 • Version 5.0 was released in March of 1997 • Version 6.0 was released in August of 1998
Introduction to Visual Basic • It is a Windows programming language • Language used to create windows application • Provides a Graphical User Interface (GUI)
Introduction to Visual Basic Input screen of a DOS-based BASIC program to fill a database ____________________________________________ Enter Name (Enter EOD to terminate): Mr. President Enter Address: 1600 Artesian Enter City: Detroit Enter State: MI Enter Phone Number: 313-982-1011 _____________________________________________
Introduction to Visual Basic • Integrated Development Environment (IDE) • Editor, Compiler, Form Builder, Debugger • Rapid Application Development (RAD) tool • Event-driven programming language • The sequence of instructions executed in the program is controlled by events, like mouse click.
Hierarchy of VB Application • Application • Application Properties • Forms • Properties • Event Handlers • Controls • Properties • Event Handlers
Steps to Design a Visual Basic Application 1. Create the interface (forms & controls) 2. Set properties for forms & controls 3. Write code for appropriate events