did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780131869004

Visual Basic 2005 : How to Program

by
  • ISBN13:

    9780131869004

  • ISBN10:

    0131869000

  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2009-01-01
  • Publisher: Prentice Hall
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $127.00

Summary

With Visual Basic.NET, Microsoft transforms Visual Basic into a supercharged tool for developing next-generation Web services and Windows applications. Now, learn Visual Basic.NET hands-on, through thousands of lines of live code in hundreds of complete working programs -- explained with exceptional clarity by the renowned programming trainers of Deitel & Associates! Visual Basic.NET How to Program starts by introducing the Visual Studio.NET development environment; then covers all key VB.NET programming fundamentals, from control structures to methods, arrays, and object-oriented programming. It delivers in-depth coverage of VB.NET GUI development; multithreading; graphics and multimedia; XML programming; database development with SQL and ADO.NET; building Web Forms and Web Services with ASP.NET; network programming; data structures; accessibility; and more. The book contains hundreds of real-world tips and techniques for writing high-quality code, improving performance and reliability, and efficient debugging. An accompanying CD-ROM contains all of the book's source code, up-to-date Visual Studio 2005 development tools, plus links to the Web's best Visual Basic.NET demos and resources. For all beginning programmers -- and developers experienced with traditional languages -- who want to master Visual Basic.NET quickly.

Table of Contents

Preface xxiii
Introduction to Computers, the Internet and Visual Basic
1(33)
Introduction
2(1)
What Is a Computer?
3(1)
Computer Organization
3(2)
Early Operating Systems
5(1)
Personal Computing, Distributed Computing and Client/Server Computing
5(1)
Hardware Trends
6(1)
Microsoft's Windows® Operating System
6(1)
Machine Languages, Assembly Languages and High-Level Languages
7(1)
Visual Basic
8(2)
C, C++, Java and Visual C#
10(1)
Other High-Level Languages
11(1)
The Internet and the World Wide Web
12(1)
Extensible Markup Language (XML)
12(1)
Microsoft's .NET
13(1)
The .NET Framework and the Common Language Runtime
14(1)
Test-Driving a Visual Basic Application
15(3)
(Only Required Section of the Case Study) Software Engineering Case Study: Introduction to Object Technology and the UML
18(5)
Wrap-Up
23(1)
Web Resources
24(10)
Introduction to the Visual Basic Express 2005 IDE
34(41)
Introduction
35(1)
Overview of the Visual Studio 2005 IDE
35(6)
Menu Bar and Toolbar
41(2)
Navigating the Visual Studio IDE
43(6)
Solution Explorer
45(2)
Toolbox
47(1)
Properties Window
48(1)
Using Help
49(4)
Using Visual Programming to Create a Simple Program that Displays Text and an Image
53(12)
Wrap-Up
65(1)
Web Resources
65(10)
Introduction to Visual Basic Programming
75(50)
Introduction
76(1)
Displaying a Line of Text
76(4)
Creating Your First Console Application in Visual Basic Express
80(8)
Displaying a Single Line of Text with Multiple Statements
88(1)
Adding Integers
89(3)
Memory Concepts
92(1)
Arithmetic
93(4)
Decision Making: Equality and Relational Operators
97(4)
Using a Message Dialog to Display a Message
101(5)
(Optional) Software Engineering Case Study: Examining the ATM Requirements Document
106(10)
Wrap-Up
116(1)
Web Resources
117(8)
Introduction to Classes and Objects
125(40)
Introduction
126(1)
Classes, Objects, Methods and Instance Variables
126(2)
Declaring a Class with a Method and Instantiating an Object of a Class
128(3)
Declaring a Method with a Parameter
131(3)
Instance Variables and Properties
134(7)
Value Types and Reference Types
141(1)
Initializing Objects with Constructors
142(3)
Validating Data with Set Accessors in Properties (Optional) Software Engineering Case Study
145(4)
Identifying the Classes in the ATM Requirements Document
149(7)
Wrap-Up
156(9)
Control Statements: Part 1
165(60)
Introduction
166(1)
Algorithms
167(1)
Pseudocode
167(1)
Control Structures
168(2)
If...Then Selection Statement
170(2)
If...Then...Else Selection Statement
172(2)
While Repetition Statement
174(3)
Do while. . .Loop Repetition Statement
177(1)
Do Until . . . Loop Repetition Statement
177(1)
Compound Assignment Operators
178(2)
Formulating Algorithms: Counter-Controlled Repetition
180(4)
Formulating Algorithms: Sentinel-Controlled Repetition
184(9)
Formulating Algorithms: Nested Control Statements
193(5)
Formulating Algorithms: Nested Repetition Statements
198(4)
Visual Basic Programming in a Windows Application
202(7)
(Optional) Software Engineering Case Study: Identifying Class Attributes in the ATM System
209(4)
Wrap-Up
213(12)
Control Statements: Part 2
225(44)
Introduction
226(1)
Essentials of Counter-Controlled Repetition
226(1)
For . . . Next Repetition Statement
227(4)
Examples Using the For . . . Next Statement
231(5)
GradeBook Case Study: Select ...Case Multiple-Selection Statement
236(7)
Do . . . Loop While Repetition Statement
243(1)
Do . . . Loop Until Repetition Statement
244(2)
Using the Exit Statement in Repetition Statements
246(2)
Using the Continue Statement in Repetition Statements
248(2)
Logical Operators
250(6)
(Optional) Software Engineering Case Study: Identifying Objects' States and Activities in the ATM System
256(4)
Wrap-Up
260(9)
Methods: A Deeper Look
269(66)
Introduction
270(1)
Modules, Classes and Methods
271(1)
Subroutines: Methods That Do Not Return a Value
272(3)
Functions: Methods That Return a Value
275(1)
Shared Methods and Class Math
276(2)
GradeBook Case Study: Declaring Methods with Multiple Parameters
278(4)
Notes on Declaring and Using Methods
282(1)
Method Call Stack and Activation Records
283(1)
Implicit Argument Conversions
284(2)
Option Strict and Data-Type Conversions
286(1)
Value Types and Reference Types
287(2)
Framework Class Library Namespaces
289(1)
Passing Arguments: Pass-by-Value vs. Pass-by-Reference
290(3)
Scope of Declarations
293(3)
Case Study: Random Number Generation
296(7)
Case Study: A Game of Chance
303(4)
Method Overloading
307(2)
Optional Parameters
309(2)
Recursion
311(4)
(Optional) Software Engineering Case Study: Identifying Class Operations in the ATM System
315(7)
Wrap-Up
322(13)
Arrays
335(63)
Introduction
336(1)
Arrays
337(1)
Declaring and Allocating Arrays
338(1)
Examples Using Arrays
339(8)
Allocating an Array
339(1)
Initializing the Values in an Array
340(1)
Summing the Elements of an Array
341(1)
Using Arrays to Analyze Survey Results
342(2)
Using Bar Charts to Display Array Data Graphically
344(1)
Using the Elements of an Array as Counters
345(2)
Case Study: Card Shuffling and Dealing Simulation
347(4)
Passing an Array to a Method
351(3)
For Each. . .Next Repetition Statement
354(1)
GradeBook Case Study: Using an Array to Store Grades
355(5)
Sorting an Array with Method Sort of Class Array
360(3)
Searching Arrays
363(4)
Searching an Array with Linear Search
363(2)
Searching a Sorted Array with Method BinarySearch of Class Array
365(2)
Rectangular Arrays
367(2)
GradeBook Case Study: Using a Rectangular Array
369(6)
Variable-Length Parameter Lists
375(1)
Jagged Arrays
376(1)
Changing the Size of an Array at Execution Time: Using the ReDim Statement
377(1)
Passing Arrays: ByVal vs. ByRef
378(4)
(Optional) Software Engineering Case Study: Collaboration Among Objects in the ATM System
382(8)
Wrap-Up
390(8)
Classes and Objects: A Deeper Look
398(51)
Introduction
399(1)
Time Class Case Study
399(8)
Class Scope
407(1)
Default and Parameterless Constructors
407(1)
Time Class Case Study: Overloaded Constructors
407(6)
Partial Classes
413(1)
Composition
413(4)
Using the Me Reference to Access the Current Object
417(2)
Garbage Collection
419(1)
Shared Class Members
420(4)
Const and ReadOnly Members
424(2)
Object Browser
426(3)
Time Class Case Study: Creating Class Libraries
429(5)
(Optional) Software Engineering Case Study: Starting to Program the Classes of the ATM System
434(5)
Wrap-Up
439(10)
Object-Oriented Programming: Inheritance
449(46)
Introduction
450(1)
Base Classes and Derived Classes
451(2)
Protected Members
453(1)
Relationship between Base Classes and Derived Classes
454(26)
Creating and Using a CommissionEmployee Class
455(4)
Creating a BasePlusCommissionEmployee Class without Using Inheritance
459(5)
Creating a CommissionEmployee--BasePlusCommissionEmployee Inheritance Hierarchy
464(5)
CommissionEmployee--BasePlusCommissionEmployee Inheritance Hierarchy Using Protected Instance Variables
469(6)
CommissionEmployee--BasePlusCommissionEmployee Inheritance Hierarchy Using Private Instance Variables
475(5)
Constructors in Derived Classes
480(6)
Software Engineering with Inheritance
486(1)
Class Object
487(1)
Friend Members
488(1)
Wrap-Up
489(6)
Object-Oriented Programming: Polymorphism
495(50)
Introduction
496(2)
Polymorphic Video Game
498(1)
Demonstrating Polymorphic Behavior
499(2)
Abstract Classes and Methods
501(3)
Case Study: Payroll System Class Hierarchy Using Polymorphism
504(15)
Creating Abstract Base Class Employee
505(2)
Creating Concrete Derived Class SalariedEmployee
507(2)
Creating Concrete Derived Class HourlyEmployee
509(2)
Creating Concrete Derived Class CommissionEmployee
511(1)
Creating Indirect Concrete Derived Class BasePlusCommissionEmployee
512(1)
Demonstrating Polymorphic Processing, Expression TypeOf . . . Is, TryCast and Downcasting
513(5)
Summary of the Allowed Assignments between Base Class and Derived Class Variables
518(1)
NotOverridable Methods and NotInheritable Classes
519(1)
Case Study: Creating and Using Interfaces
519(11)
Developing an IPayable Hierarchy
521(1)
Declaring Interface IPayable
522(1)
Creating Class Invoice
522(3)
Modifying Class Employee to Implement Interface IPayable
525(2)
Modifying Class SalariedEmployee for Use in the IPayable Hierarchy
527(2)
Using Interface IPayable to Process Invoices and Employees Polymorphically
529(1)
Common Interfaces of the .NET Framework Class Library (FCL)
530(1)
(Optional) Software Engineering Case Study: Incorporating Inheritance and Polymorphism into the ATM System
530(9)
Wrap-Up
539(6)
Exception Handling
545(32)
Introduction
546(1)
Exception Handling Overview
547(1)
Example: Divide by Zero Without Exception Handling
547(3)
Example: Handling DivideByZeroExceptions and FormatExceptions
550(5)
Enclosing Code in a Try Block
552(1)
Catching Exceptions
553(1)
Uncaught Exceptions
553(1)
Termination Model of Exception Handling
553(1)
Flow of Control When Exceptions Occur
554(1)
.NET Exception Hierarchy
555(2)
Classes ApplicationException and SystemException
555(1)
Determining Which Exceptions a Method Throws
556(1)
Finally Block
557(7)
Exception Properties
564(4)
User-Defined Exception Classes
568(3)
Wrap-Up
571(6)
Graphical User Interface Concepts Part 1
577(50)
Introduction
578(2)
Windows Forms
580(2)
Event Handling
582(6)
A Simple Event-Driven GUI
582(2)
Another Look at the Visual Studio Generated Code
584(1)
Delegates and the Event Handling Mechanism
585(1)
Other Ways to Create Event Handlers
586(1)
Locating Event Information
587(1)
Control Properties and Layout
588(4)
Labels, TextBoxes and Buttons
592(3)
GroupBoxes and Panels
595(3)
CheckBoxes and RadioButtons
598(8)
PictureBoxes
606(1)
ToolTips
607(2)
NumericUpDown Control
609(3)
Mouse-Event Handling
612(3)
Keyboard-Event Handling
615(3)
Wrap-Up
618(9)
Graphical User Interface Concepts: Part 2
627(67)
Introduction
628(1)
Menus
628(10)
MonthCalendar Control
638(1)
DateTimePicker Control
639(3)
LinkLabel Control
642(3)
ListBox Control
645(4)
CheckedListBox Control
649(3)
ComboBox Control
652(4)
TreeView Control
656(5)
ListView Control
661(6)
TabControl Control
667(4)
Multiple Document Interface (MDI) Windows
671(8)
Visual Inheritance
679(3)
User-Defined Controls
682(4)
Wrap-Up
686(8)
Multithreading
694(46)
Introduction
695(1)
Thread States: Life Cycle of a Thread
696(2)
Thread Priorities and Thread Scheduling
698(2)
Creating and Executing Threads
700(3)
Thread Synchronization and Class Monitor
703(2)
Producer/Consumer Relationship without Thread Synchronization
705(6)
Producer/Consumer Relationship with Thread Synchronization
711(8)
Producer/Consumer Relationship: Circular Buffer
719(8)
Multithreading with GUIs
727(4)
Wrap-Up
731(9)
Strings, Characters and Regular Expressions
740(45)
Introduction
741(1)
Fundamentals of Characters and Strings
742(1)
String Constructors
743(1)
String Indexer, Length Property and CopyTo Method
744(1)
Comparing Strings
745(4)
Locating Characters and Substrings in Strings
749(2)
Extracting Substrings from Strings
751(1)
Concatenating Strings
752(1)
Miscellaneous String Methods
753(1)
Class StringBuilder
754(1)
Length and Capacity Properties, EnsureCapacity Method and Indexer of Class StringBuilder
755(2)
Append and AppendFormat Methods of Class StringBuilder
757(2)
Insert, Remove and Replace Methods of Class StringBuilder
759(3)
Char Methods
762(2)
Card Shuffling and Dealing Simulation
764(3)
Regular Expressions and Class RegEx
767(9)
Regular Expression Example
768(2)
Validating User Input with Regular Expressions
770(4)
Regex methods Replace and Split
774(2)
Wrap-Up
776(9)
Graphics and Multimedia
785(65)
Introduction
786(1)
Drawing Classes and the Coordinate System
786(2)
Graphics Contexts and Graphics Objects
788(1)
Color Control
789(6)
Font Control
795(5)
Drawing Lines, Rectangles and Ovals
800(3)
Drawing Arcs
803(2)
Drawing Polygons and Polylines
805(4)
Advanced Graphics Capabilities
809(4)
Introduction to Multimedia
813(1)
Loading, Displaying and Scaling Images
814(1)
Animating a Series of Images
815(10)
Windows Media Player
825(2)
Microsoft Agent
827(13)
Wrap-Up
840(10)
Files and Streams
850(49)
Introduction
851(1)
Data Hierarchy
851(2)
Files and Streams
853(1)
Classes File and Directory
854(9)
Creating a Sequential-Access Text File
863(9)
Reading Data from a Sequential-Access Text File
872(4)
Case Study: A Credit-Inquiry Program
876(6)
Serialization
882(1)
Creating a Sequential-Access File Using Object Serialization
883(6)
Reading and Deserializing Data from a Sequential-Access Text File
889(3)
Wrap-Up
892(7)
Extensible Markup Language (XML)
899(61)
Introduction
900(1)
XML Basics
900(3)
Structuring Data
903(7)
XML Namespaces
910(3)
Document Type Definitions (DTDs)
913(3)
W3C XML Schema Documents
916(7)
(Optional) Extensible Stylesheet Language and XSL Transformations
923(9)
(Optional) Document Object Model (DOM)
932(13)
(Optional) Schema Validation with Class XmlReader
945(3)
(Optional) XSLT with ClassXslCompiledTransform
948(2)
Wrap-Up
950(1)
Web Resources
951(9)
Database, SQL and ADO.NET
960(56)
Introduction
961(1)
Relational Databases
962(1)
Relational Database Overview: Books Database
963(4)
SQL
967(9)
Basic Select Query
968(1)
Where Clause
968(2)
Order By Clause
970(1)
Merging Data from Multiple Tables: INNER JOIN
971(2)
Insert Statement
973(1)
Update Statement
974(1)
Delete Statement
975(1)
ADO.NET Object Model
976(1)
Programming with ADO.NET: Extracting Information from a Database
977(12)
Displaying a Database Table in a DataGridView
977(8)
How Data Binding Works
985(4)
Querying the Books Database
989(9)
Programming with ADO.NET: Address Book Case Study
998(7)
Using a DataSet to Read and Write XML
1005(3)
Wrap-Up
1008(1)
Web Resources
1008(8)
ASP.NET 2.0, Web Forms and Web Controls
1016(110)
Introduction
1017(1)
Simple HTTP Transactions
1018(2)
Multitier Application Architecture
1020(1)
Creating and Running a Simple Web-Form Example
1021(14)
Examining an ASPX File
1022(2)
Examining a Code-Behind File
1024(1)
Relationship Between an ASPX File and a Code-Behind File
1025(1)
How the Code in an ASP.NET Web Page Executes
1026(1)
Examining the XHTML Generated by an ASP.NET Application
1026(1)
Building an ASP.NET Web Application
1027(8)
Web Controls
1035(22)
Text and Graphics Controls
1036(5)
AdRotator Control
1041(4)
Validation Controls
1045(12)
Session Tracking
1057(16)
Cookies
1058(8)
Session Tracking with HttpSessionState
1066(7)
Case Study: Connecting to a Database in ASP.NET
1073(12)
Building a Web Form That Displays Data from a Database
1074(10)
Modifying the Code-Behind File for the Guestbook Application
1084(1)
Case Study: Secure Books Database Application
1085(29)
Examining the Completed Secure Books Database Application
1085(4)
Creating the Secure Books Database Application
1089(25)
Wrap-Up
1114(1)
Web Resources
1115(11)
Web Services
1126(64)
Introduction
1127(1)
.NET Web Services Basics
1128(6)
Creating a Web Service in Visual Web Developer
1129(1)
Determining a Web Service's Functionality
1130(1)
Testing a Web Service's Methods
1131(2)
Building a Client to Use a Web Service
1133(1)
Simple Object Access Protocol (SOAP)
1134(1)
Publishing and Consuming Web Services
1135(17)
Defining the HugeInteger Web Service
1136(5)
Building a Web Service in Visual Web Developer
1141(2)
Deploying the HugeInteger Web Service
1143(1)
Creating a Client to Consume the HugeInteger Web Service
1144(4)
Consuming the HugeInteger Web Service
1148(4)
Session Tracking in Web Services
1152(13)
Creating a Blackjack Web Service
1153(3)
Consuming the Blackjack Web Service
1156(9)
Using Web Forms and Web Services
1165(7)
Adding Data Components to a Web Service
1167(2)
Creating a Web Form to Interact with the Airline Reservation Web Service
1169(3)
User-Defined Types in Web Services
1172(9)
Wrap-Up
1181(1)
Web Resources
1182(8)
Networking: Streams-Based Sockets and Datagrams
1190(57)
Introduction
1191(1)
Connection-Oriented vs. Connectionless Communication
1192(1)
Protocols for Transporting Data
1192(1)
Establishing a Simple TCP Server Using Stream Sockets
1193(2)
Establishing a Simple TCP Client Using Stream Sockets
1195(1)
Client/Server Interaction with Stream-Socket Connections
1195(10)
Connectionless Client/Server Interaction with Datagrams
1205(5)
Client/Server Tic-Tac-Toe Using a Multithreaded Server
1210(14)
WebBrowser Class
1224(4)
.NET Remoting
1228(11)
Wrap-Up
1239(8)
Data Structures
1247(42)
Introduction
1248(1)
Primitive-Type Structures; Boxing and Unboxing
1248(1)
Self-Referential Classes
1249(2)
Linked Lists
1251(11)
Stacks
1262(4)
Queues
1266(3)
Trees
1269(13)
Binary Search Tree of Integer Values
1270(7)
Binary Search Tree of IComparable Objects
1277(5)
Wrap-Up
1282(7)
Generics
1289(24)
Introduction
1290(1)
Motivation for Generic Methods
1291(2)
Generic Method Implementation
1293(2)
Type Constraints
1295(3)
Overloading Generic Methods
1298(1)
Generic Classes
1298(9)
Notes on Generics and Inheritance
1307(1)
Wrap-Up
1307(6)
Collections
1313(32)
Introduction
1314(1)
Collections Overview
1315(2)
Class Array and Enumerators
1317(4)
Non-Generic Collections
1321(11)
Class ArrayList
1321(4)
Class Stack
1325(2)
Class Hashtable
1327(5)
Generic Collections
1332(6)
Generic Class SortedDictionary
1332(2)
Generic Class LinkedList
1334(4)
Synchronized Collections
1338(1)
Wrap-Up
1339(6)
Operator Precedence Chart
1345(2)
Number Systems
1347(13)
Introduction
1348(3)
Abbreviating Binary Numbers as Octal and Hexadecimal Numbers
1351(1)
Converting Octal and Hexadecimal Numbers to Binary Numbers
1352(1)
Converting from Binary, Octal or Hexadecimal to Decimal
1352(1)
Converting from Decimal to Binary, Octal or Hexadecimal
1353(2)
Negative Binary Numbers: Two's Complement Notation
1355(5)
Using the Visual Studio 2005 Debugger
1360(19)
Introduction
1361(1)
Breakpoints and the Continue Command
1361(5)
The Locals and Watch Windows
1366(3)
Controlling Execution Using the Step Into, Step Over, Step Out and Continue Commands
1369(3)
Other Features
1372(4)
Edit and Continue
1372(2)
Exception Assistant
1374(1)
Just My Code™ Debugging
1375(1)
Other New Debugger Features
1376(1)
Wrap-Up
1376(3)
ASCII Character Set
1379(1)
Unicode
1380(12)
Introduction
1381(1)
Unicode Transformation Formats
1382(1)
Characters and Glyphs
1383(1)
Advantages/Disadvantages of Unicode
1383(1)
Unicode Consortium's Web Site
1384(1)
Using Unicode
1385(2)
Character Ranges
1387(5)
Introduction to XHTML: Part 1
1392(21)
Introduction
1393(1)
Editing XHTML
1393(1)
First XHTML Example
1394(3)
W3C XHTML Validation Service
1397(1)
Headers
1398(2)
Linking
1400(2)
Images
1402(4)
Special Characters and More Line Breaks
1406(2)
Unordered Lists
1408(2)
Nested and Ordered Lists
1410(2)
Web Resources
1412(1)
Introduction to XHTML: Part 2
1413(31)
Introduction
1414(1)
Basic XHTML Tables
1414(3)
Intermediate XHTML Tables and Formatting
1417(2)
Basic XHTML Forms
1419(3)
More Complex XHTML Forms
1422(7)
Internal Linking
1429(3)
Creating and Using Image Maps
1432(3)
meta Elements
1435(2)
frameset Element
1437(4)
Nested framesets
1441(2)
Web Resources
1443(1)
XHTML Special Characters
1444(2)
XHTML Colors
1446(3)
ATM Case Study Code
1449(25)
ATM Case Study Implementation
1449(1)
Class ATM
1450(5)
Class Screen
1455(1)
Class Keypad
1456(1)
Class CashDispenser
1457(1)
Class DepositSlot
1458(1)
Class Account
1459(2)
Class BankDatabase
1461(2)
Class Transaction
1463(2)
Class BalanceInquiry
1465(1)
Class Withdrawal
1466(4)
Class Deposit
1470(3)
Module ATMCaseStudy
1473(1)
Wrap-Up
1473(1)
UML 2: Additional Diagram Types
1474(2)
Introduction
1474(1)
Additional Diagram Types
1474(2)
Primitive Types
1476(2)
Index 1478

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program