a introduction to programming using visual basic.net ( fifth edition ) david i. schneider

37
A Introduction to Programming Using Visual Basic.NET Fifth Edition David I. Schneider

Post on 15-Jan-2016

230 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

A Introduction to Programming Using Visual Basic.NET

( Fifth Edition)David I. Schneider

Page 2: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Name : Liang JiankunE-Mail : [email protected]: 23986531Office: Computer Center

Instructor

Page 3: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 3

Chapter 1

An Introduction to Computers and Visual Basic.NET

Page 4: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 4

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

Page 5: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 5

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

Page 6: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 6

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

Page 7: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 7

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

Page 8: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 8

Sect.1 Introduction to Computers

Some important and essential topics:

Topic2: The main components of a PC

Page 9: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

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)

the CPU can be thought of as the brain of the computer, carries out all computations

Page 10: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

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)

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!.

Page 11: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 11

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.

Page 12: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

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

– Mainboard (or motherboard) is the primary component of a computer. It is the hub which is used to connect all of the computer's important components .

1—slot for APG graphics card(AGP显卡插槽 )

2—slot for PCI devices3—BIOS chip4—chip of mainboard

(north bridge北桥芯片 )5—interface for floppy

driver6,7—interface for IDE

devices8—interface for ATX

power(ATX电源接口 )9—slot for RAM10—slot for CPU11—interface for peripheral

equipment (外部设备接口 )

Page 13: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 13

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

Page 14: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 14

Sect.1 Introduction to ComputersSome important and essential topics:

Topic3: Hardware vs. Software• Hardware – the physical components of a computer

hardware

ALU (Arithmetic Logical Unit) 运算器

Control Unit 控制器

Memorizer 存储器

Input Device 输入设备

Output Device 输出设备

CPU 中央处理器

internal memory 内存储器external memory 外存储器

输入 /输出设备 (I/O设备 )

• Software – The instructions that tell the computer what to do–Operating System, Microsoft Office, Photoshop, etc.

Page 15: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 15

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

Page 16: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 16

Sect.1 Introduction to ComputersSome 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)

Page 17: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 17

Sect.2 Using Windows

• Topic1: Mouse Pointers• Topic2: Mouse action• Topic3: Windows and windows• Topic4: Using the Notepad

Page 18: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 18

Topic1: Mouse Pointers

Two basic types of mouse pointers:• arrow• hourglass

Page 19: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 19

Topic2: Mouse Actions• Pointing• Hovering• Clicking• Double-Clicking• Dragging

Page 20: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 20

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

Page 21: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 21

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 applicationClick the ico of the application from Start MenuType the application’s name in run box from Start

MenuDouble click a file associated with the application

Page 22: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 22

Notepad

1.

2.

3.

4.

• The largest part of the window where the document is edited.

• Cursor is the blinking vertical line where you can delete and insert letters.

Page 23: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 23

Notepad

1.

2.

3.

4.

• 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 size of the window

Page 24: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 24

Notepad

1.

2.

3.

4.

• Vertical and Horizontal scroll bar• The arrows is used for small

increments• The scroll box is used for moving

quickly

Page 25: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 25

Notepad

1.

2.

3.

4.

Page 26: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 26

Notepad

1.

2.

3.

4.

5. Important keys for text editors

Important keys for most text editors:• Home, Ctrl+Home• End, Ctrl+End• Back Space, Del• Ctrl+Back Space, Ctrl+Del• Alt/O/W (open Word Wrap feature)• Access keys• Shortcut keys

Page 27: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 27

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).

Page 28: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 28

Key Terms in using Folders

• Root folder• Path Example:

C:\VB01\VB.EXE

• File Specification: You should always know where you are saving your files (driver letter + colon + path + file name).

Filename

Drive letter

• composed of the base name, the period and the extension.

• can be up to 215 characters (except \, /,:,*,?,”,<,>,|).

Page 29: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 29

Explorer window

Page 30: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 30

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

Page 31: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 31

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

Page 32: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 32

Sect.5 Biographical History of Computing

• There are lots of people we should never forget. They made important contributions to the evolution of computing.

Page 33: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 33

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

Page 34: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 34

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

Page 35: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 35

John von Neumann ( 冯 ·诺依曼 )

• 1903-1957, Hungarian-American mathematician• developed stored program concept• von Neumann machines (冯诺依曼型计算机 ) • the father of the computer

Page 36: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 36

Bill Gates (比尔 ·盖茨 )

• 1955-now , cofounder of Microsoft Corporation• the richest man in the world during 2001-2007• the inventor of PC-DOS

Page 37: A Introduction to Programming Using Visual Basic.NET ( Fifth Edition ) David I. Schneider

Chapter 1 - VB.NET by Schneider 37

Many people we should remember

• Search the information on website by yourself.