Chapter 1

advertisement
A Introduction to Programming
Using Visual Basic.NET
(Fifth Edition)
David I. Schneider
Instructor
Name:Liang Jiankun
E-Mail:teacherljk@163.com
Phone: 23986531
Office: Computer Center
Chapter 1
An Introduction to Computers
and Visual Basic.NET
Chapter 1 - VB.NET by Schneider
3
Outline and Objectives
•
•
•
•
•
Sect.1: Introduction to Computers
Sect.2: Using Windows
Sect.3: Files and Folders
Sect.4: An Introduction to Visual Basic.NET
Sect.5: Biographical History of Computing
Chapter 1 - VB.NET by Schneider
4
Sect.1 Introduction to Computers
• Personal computer vs. Server
• What are the main components of a PC
• What are some uses of computers in our
society
• What are some topics covered in this text that
students could use immediately
• How do we communicate with the computer
• How do we get computers to perform
complicated tasks
Chapter 1 - VB.NET by Schneider
5
Sect.1 Introduction to Computers
(cont.)
• Are there certain features that all programs
have in common
• Hardware vs. Software
• Programmer vs. User
• How did VB.NET evolve
• What is the Internet and how did it come about
• What is the World Wide Web and how is that
different from the Internet
Chapter 1 - VB.NET by Schneider
6
Sect.1 Introduction to Computers
Some important and essential topics:
Topic1: Personal Computer vs. Server
• PC means a computer that is operated by one
person at a time
• Server means a computer that provides resources
(files, printers, internet access etc.) to other
computers
Chapter 1 - VB.NET by Schneider
7
Sect.1 Introduction to Computers
Some important and essential topics:
Topic2: The main components of a PC
Chapter 1 - VB.NET by Schneider
8
Sect.1 Introduction to Computers
Some important and essential topics:
Topic2: The main components of a PC (cont.)
• Devices hidden from view inside the System Unit
– Microprocessor named CPU(Central Processing Unit)
the CPU can be
thought of as the
brain of the computer,
carries out all
computations
Chapter 1 - VB.NET by Schneider
9
Sect.1 Introduction to Computers
Some important and essential topics:
Topic2: The main components of a PC (cont.)
• Devices hidden from view inside the System Unit
– Microprocessor named CPU(Central Processing Unit)
– Memory named RAM(Random Access Memory)
the memory stores the
instructions and data being
processed by the computer.
the contents will be lost
when the computer’s power is
turned off!
.
Chapter 1 - VB.NET by Schneider
10
Sect.1 Introduction to Computers
Some important and essential topics:
Topic2: The main components of a PC (cont.)
• Devices hidden from view inside the System Unit
– Microprocessor named CPU(Central Processing Unit)
– Memory named RAM(Random Access Memory)
– Hard disk drive, Floppy drive, CD driver
the hard disk and CD-ROM is
used to store instructions and
data for long time purpose.
The data will not be lost when
the power is off.
Chapter 1 - VB.NET by Schneider
11
Sect.1 Introduction to Computers
1—slot for APG graphics
card(AGP显卡插槽)
2—slot for PCI devices
3—BIOS chip
4—chip of mainboard
• Devices
hidden from view inside the System Unit
(north
bridge北桥芯片)
– Microprocessor
named CPU(Central Processing Unit)
5—interface
for floppy
driver– Memory named RAM(Random Access Memory)
6,7—interface for IDE
– Hard disk drive, Floppy drive, CD driver
devices
– Mainboard
8—interface
for ATX
– Mainboard (or motherboard) is the primary
power(ATX电源接口)
9—slot for RAMcomponent of a computer. It is the hub
10—slot for CPUwhich is used to connect all of the
computer's important components .
11—interface for
peripheral equipment
(外部设备接口)
Some important and essential topics:
Topic2: The main components of a PC (cont.)
Chapter 1 - VB.NET by Schneider
12
Sect.1 Introduction to Computers
Some important and essential topics:
Topic2: The main components of a PC (cont.)
• Devices hidden from view inside the System Unit
–
–
–
–
–
–
–
Microprocessor named CPU(Central Processing Unit)
Memory named RAM(Random Access Memory)
Hard disk drive, Floppy drive, CD driver
Mainboard
Graphics card
Network card
Sound card
Chapter 1 - VB.NET by Schneider
13
Sect.1 Introduction to Computers
Some important and essential topics:
Topic3: Hardware vs. Software
• Hardware – the physical components of a computer
ALU (Arithmetic Logical Unit) 运算器
CPU 中央处理器
控制器
Control Unit
hardware
Memorizer 存储器
internal memory 内存储器
external memory 外存储器
Input Device 输入设备
输入/输出设备(I/O设备)
Output Device 输出设备
• Software – The instructions that tell the computer what to do
– Operating System,
Microsoft
Office,
Photoshop, etc.
Chapter
1 - VB.NET
by Schneider
14
Sect.1 Introduction to Computers
Some important and essential topics:
Topic4: How do we communicate with the computer
• Low level language: hard understand for human
 Machine language (机器语言,composed of 0 and 1)
 assembly language (汇编语言)
• High level language: easy understand for human





C
C++
C#
VB
Java
Chapter 1 - VB.NET by Schneider
15
Sect.1 Introduction to Computers
Some important and essential topics:
Topic5: Programmer vs. User
• Programmer
– the person who writes the instructions (or programs) for the computer to
solve problems.
– Pay much attention to the code (how to write it).
• User
– any person who uses the program
– Pay attention to the interface of the program (how to use it)
Chapter 1 - VB.NET by Schneider
16
Sect.2 Using Windows
•
•
•
•
Topic1: Mouse Pointers
Topic2: Mouse action
Topic3: Windows and windows
Topic4: Using the Notepad
Chapter 1 - VB.NET by Schneider
17
Topic1: Mouse Pointers
Two basic types of mouse pointers:
• arrow
• hourglass
Chapter 1 - VB.NET by Schneider
18
Topic2: Mouse Actions
•
•
•
•
•
Pointing
Hovering
Clicking
Double-Clicking
Dragging
Chapter 1 - VB.NET by Schneider
19
Topic3: Windows and windows
Windows
• a kind of Operating System which organizes the
screen into rectangular regions. Each region likes a
window
• window
• a rectangular region in which an application runs
inside
– Title Bar
– Active window
Chapter 1 - VB.NET by Schneider
20
Topic4: Using the Notepad
• Notepad is an elementary word processor
included with Windows and is installed by
default under the Accessories program group
• Most of the methods used for notepad can be
applied to other Windows applications.
• The methods to invoke an application
 Click the ico of the application from Start Menu
 Type the application’s name in run box from Start
Menu
 Double click a file associated with the application
Chapter 1 - VB.NET by Schneider
21
Notepad
•
4.
The largest part of the
window where the
2.document is edited.
• Cursor is the blinking
vertical line where you
can delete and insert
letters.
1.
3.
Chapter 1 - VB.NET by Schneider
22
Notepad
2.
4.
1.
• show the document’s name
• three control buttons on the right
side named minimize, maximize
(restore), close button
• system menu button
• move the position of he window
• adjust the
3. size of the window
Chapter 1 - VB.NET by Schneider
23
Notepad
2.
4.
1.
• Vertical and Horizontal scroll bar
• The arrows is used for small
increments
• The scroll box is used for moving
quickly
3.
Chapter 1 - VB.NET by Schneider
24
Notepad
2.
4.
1.
3.
Chapter 1 - VB.NET by Schneider
25
Notepad
4.
Important keys for most text editors:
• Home, Ctrl+Home
2.
• End, Ctrl+End
• Back Space, Del
• Ctrl+Back Space, Ctrl+Del
• Alt/O/W (open Word Wrap feature)
• Access keys
• Shortcut keys
1.
5. Important keys for text editors
3.
Chapter 1 - VB.NET by Schneider
26
Sect.3 Files & Folders:
•
•
•
•
Disk is a permanent storage.
A disk can store thousands of files.
A disk drive is identified by a letter.
To organize your files you have to store them in
different folders (directories).
Chapter 1 - VB.NET by Schneider
27
Key Terms in using Folders
• Root folder
• Path Example:
Filename
C:\VB01\VB.EXE
Drive letter
• File Specification:
You should
always
know
• composed
of the base
name, the
period and the extension.
where you are saving
your files (driver letter +
• can be up to 215 characters (except \,
/,:,*,?,”,<,>,|).
colon + path + file name).
Chapter 1 - VB.NET by Schneider
28
Explorer window
Chapter 1 - VB.NET by Schneider
29
Using Windows Explorer
•
•
•
•
•
•
Hide a file or folder
Show hide attribute files and folders
Show or hide file extensions for known file types
Add or remove read-only attribute
Copy or remove files and folders
Rename and delete operation
Chapter 1 - VB.NET by Schneider
30
Sect.4 the evolution of Visual Basic
•
•
•
•
•
•
•
Version 1.0 – 1991
Version 2.0 – 1992
Version 3.0 – 1993
Version 4.0 – 1995
Version 5.0 – 1997
Version 6.0 – 1998
VB.NET – 2002(not backward compatible with early
versions)
• VB 2005
• VB 2008
• VB 2010
Chapter 1 - VB.NET by Schneider
31
Sect.5 Biographical History of
Computing
• There are lots of people we should never
forget. They made important contributions to
the evolution of computing.
Chapter 1 - VB.NET by Schneider
32
Charles Babbage(查理斯·巴贝奇)
• 1792-1871,British mathematician and engineer
• The inventor of “analytical engine”
• Devised the five main department of modern
computers (Input, Output, Memory, Arithmetic
Logical Unit, Control Unit)
• The father of the computer
Chapter 1 - VB.NET by Schneider
33
Alan Turing(阿兰·图灵)
• 1912-1954, A gifted and far-sighted British
mathematician
• deciphered German code and changed the
course of WWII
• the inventor of “Turing Machine”
• father of artificial intelligence
• Suicide death
Chapter 1 - VB.NET by Schneider
34
John von Neumann (冯·诺依曼)
•
•
•
•
1903-1957, Hungarian-American mathematician
developed stored program concept
von Neumann machines (冯诺依曼型计算机)
the father of the computer
Chapter 1 - VB.NET by Schneider
35
Bill Gates (比尔·盖茨)
• 1955-now,cofounder of Microsoft Corporation
• the richest man in the world during 2001-2007
• the inventor of PC-DOS
Chapter 1 - VB.NET by Schneider
36
Many people we should remember
• Search the information on website by yourself.
Chapter 1 - VB.NET by Schneider
37
Download