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.

9781418835460

Programming With Microsoft Visual Basic 2005

by
  • ISBN13:

    9781418835460

  • ISBN10:

    1418835463

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2006-06-27
  • Publisher: Cengage Learning Ptr
  • 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: $228.95

Summary

Programming with Microsoft Visual Basic 2005: An Object-Oriented Approach, Second Edition is designed for individuals with little or no programming background. In this edition, each chapter is divided into two lessons - Concept and Application. The Concept lesson appears first. Software design and programming concepts appear in this section. In the Application lesson, you will find the design and implementation of a real-world application, along with limited hands-on steps to complete that application.

Table of Contents

Preface xxi
Read This Before You Begin xxv
An Introduction to Programming and the .NET Framework
1(72)
Concept Lesson
2(1)
Introduction to Software Development
2(1)
Software Design Methodologies and Tools
3(11)
Pseudocode
5(1)
Top-Down Design
6(1)
Flowcharting
7(4)
The Unified Modeling Language
11(3)
Introduction to Programming Control Structures
14(7)
The Sequence Structure
14(1)
The Selection Structure
15(2)
The Repetition Structure
17(2)
Combining Control Structures
19(2)
The Evolution of Computer Programming Languages
21(5)
First-Generation Machine Languages
21(1)
Second-Generation Assembly Languages
22(1)
Third-Generation Programming Languages
23(2)
Fourth-Generation Programming Languages
25(1)
Introduction to Object-Oriented Programming Languages
26(6)
Characteristics of Object-Oriented Programming Languages
27(1)
The Visual Studio Implementation of Object-Oriented Programming
28(2)
Procedural and Event-Driven Languages
30(2)
The Syntax of Programming Languages
32(6)
Types of Programming Statements
33(1)
Reserved Words and Operators
34(3)
Identifiers and Their Names
37(1)
Creating the Structure of a Visual Basic Application
38(4)
Namespace Blocks
38(1)
Introduction to Module Blocks
39(1)
Introduction to Procedure Blocks
39(3)
Writing Executable Statements
42(7)
Calling a .NET Framework Class Library Method
43(3)
Continuation Lines
46(1)
The Methods of the System.Console Class
47(1)
Calling the Members of the SystemInformation Class
47(2)
Using a Command Prompt Window
49(3)
Absolute Paths
51(1)
Relative Paths
51(1)
Using Absolute and Relative Directories
51(1)
Compiling and Executing a Visual Basic Application
52(3)
Application Lesson
55(1)
Creating a Console Application
55(5)
Application Lesson--Design
56(2)
Application Lesson--Implementation
58(2)
Chapter Summary
60(2)
Key Terms
62(2)
Answers to Mini-Quizzes
64(1)
Review Questions
65(4)
Programming Questions
69(1)
Hands-On Projects
70(3)
Creating a Console Application With Visual Studio
73(70)
Concept Lesson
74(1)
Introduction to Visual Studio
74(1)
Configuring Visual Studio for Use with Visual Basic
75(6)
Introduction to the Visual Studio Help System
81(1)
Understanding the Organization of the Help System
82(8)
Language Help Pages
83(3)
Members Help Pages
86(1)
Class Help Pages
87(3)
Navigating Through the Help System
90(9)
Introduction to Help Filters
91(1)
Using the Table of Contents
91(5)
Using the Index Window
96(1)
Using the Search Window
97(1)
Using How Do I Help
98(1)
Introduction to the Visual Studio Object Browser
99(4)
Types of Visual Studio Applications
103(1)
Introduction to Visual Studio Solutions and Projects
104(9)
Creating a Visual Studio Solution
108(1)
Saving a Visual Studio Solution
108(1)
Organization of a Visual Studio Solution
109(3)
Using the Solution Explorer
112(1)
Windows of the Visual Studio IDE
113(7)
Tool Windows
113(2)
Document Windows
115(5)
Compiling and Executing a Visual Basic Project with Visual Studio
120(2)
Compiling a Visual Basic Project
120(1)
Executing a Visual Basic Project
121(1)
Creating Application Comments
122(1)
Introduction to the My Object
123(4)
The My.Application Object
124(1)
The My.Computer Object
125(1)
The My.Computer.Network Object
126(1)
Application Lesson
127(1)
Creating a Console Application with Visual Studio
127(5)
Application Lesson--Design
127(1)
Application Lesson--Implementation
128(4)
Chapter Summary
132(2)
Key Terms
134(1)
Answers to Mini-Quizzes
135(1)
Review Questions
135(4)
Programming Questions
139(2)
Hands-On Projects
141(2)
Introduction to Event Handlers and Windows Forms Applications
143(74)
Concept Lesson
144(1)
Comparing Command-Line and Form-Based Interfaces
144(1)
Designing a User Interface---Part 1
145(6)
Using the Visual Studio IDE to Create Windows Application Projects---Part 2
151(17)
The Anatomy of a Windows Application Project
153(7)
Introduction to the Properties Window
160(8)
Using the Visual Studio IDE to Create and Configure Control Instances
168(3)
Creating Control and Deleting Control Instances
168(1)
Moving and Resizing Control Instances
168(1)
Working with Multiple Control Instances
169(1)
Aligning Multiple Control Instances
169(2)
Introduction to Visual Studio Controls
171(13)
The System.Windows.Forms.Control Class
171(1)
Understanding the Name Property
172(2)
Members of the Control Class
174(10)
Creating Code for a Windows Application Project
184(9)
Introduction to Class Blocks and Partial Classes
184(3)
Introduction to Event Handlers
187(3)
Using Assignment Statements to Read and Write Properties
190(3)
Application Lesson
193(1)
Creating a Windows Application Project with Visual Studio
193(9)
Application Lesson--User Interface
194(1)
Application Lesson--Design
194(1)
Previewing the Application
195(7)
Chapter Summary
202(2)
Key Terms
204(1)
Answers to Mini-Quizzes
205(1)
Review Questions
206(4)
Programming Questions
210(1)
Hands-On Projects
211(6)
Introduction to Numeric Data Types and Variables
217(74)
Concept Lesson
218(1)
Introduction to Data Types and Data Type Storage
218(14)
Integral Data Types
219(5)
Floating-Point Data Types
224(2)
Properties of Numeric Data Types
226(2)
Introduction to the String Data Type
228(2)
Summary of Data Type Storage
230(1)
Performance of Numeric Data Types
230(2)
Value Types and Reference Types
232(2)
Value Types
232(1)
Reference Types
233(1)
Introduction to Variables
234(2)
Variable Lifetime
234(1)
Variable Scope and Accessibility
235(1)
The Syntax to Declare Variables
236(3)
Initializing Variables
237(1)
Variable Naming Conventions
238(1)
Introduction to User-Defined Constants
239(3)
Introduction to Expressions
242(7)
Precedence in Expressions
246(1)
Changing the Default Precedence
247(2)
Numeric Data Types and Type Conversion
249(11)
Integral Data Types
249(1)
Floating-Point Data Types
249(1)
Common Arithmetic Errors
250(1)
Understanding Type Conversion
251(1)
Introduction to Strict Type Checking
251(1)
Enforcing Explicit Variable Declaration
252(1)
Performing Explicit Type Conversion
253(2)
Formatting Output Strings
255(5)
The Imports Statement
260(2)
Using the Imports Statement to Import Namespaces and Classes
260(1)
Importing Namespaces Using the Project Properties Dialog Box
261(1)
Intrinsic Functions Compared to Methods
262(1)
The Textbox Control
263(2)
Introduction to Tab Order
265(4)
Application Lesson
269(1)
Creating a Future Value Calculator
269(6)
Application Lesson--User Interface
269(1)
Application Lesson--Design
270(2)
Application Lesson--Implementation
272(3)
Chapter Summary
275(2)
Key Terms
277(2)
Answers to Mini-Quizzes
279(1)
Review Questions
279(4)
Programming Questions
283(2)
Hands-On Projects
285(6)
The String and Datetime Data Types
291(62)
Concept Lesson
292(1)
Introduction to Characters and Strings
292(1)
Introduction to the Char Data Type and Character Encodings
292(5)
The ASCII Character Set
293(1)
Introduction to Unicode
293(4)
Introduction to the String Data Type
297(7)
Statements to Declare a String
298(1)
Type Conversion
299(1)
String Operations
300(1)
Control Characters and Special Characters
301(1)
Embedding Quotation Marks in Strings
302(1)
Working with Multiline Text Boxes
303(1)
String Manipulation Methods
304(10)
Determining the Length of a String
305(1)
Converting the Case of a String
305(1)
Working with Parts of a String
306(2)
Inserting and Removing Characters from a String
308(4)
Deleting Leading or Trailing Spaces
312(2)
Introduction to Dates
314(1)
The System.Datetime Data Type
315(5)
Members of the System.DateTime Structure
316(1)
Methods That Work with Dates
317(3)
Performing Calculations on Dates
320(5)
Introduction to the TimeSpan Structure
321(1)
Introduction to the DateDiff Method
322(3)
The Datetimepicker Control
325(3)
Selecting a Date Using the DateTimePicker Control
326(2)
The Timer Control
328(3)
The Syntax of the Timer Control
329(1)
Using the Timer Control
330(1)
Application Lesson
331(1)
Using Strings and Dates to Create a Form Letter
331(8)
Application Lesson--User Interface
331(1)
Application Lesson--Design
332(1)
Application Lesson--Implementation
333(6)
Chapter Summary
339(1)
Key Terms
340(1)
Answers to Mini-Quizzes
341(1)
Review Questions
342(4)
Programming Questions
346(2)
Hands-On Projects
348(5)
Understanding the Structure of an Application: Procedures, Modules, and Classes
353(70)
Concept Lesson
354(1)
Using Multiple Forms and Classes to Build an Application
354(1)
The Purpose of Procedures
355(1)
Introduction to Function Procedures
356(6)
Understanding Procedure Arguments
358(1)
Executing a Procedure
359(1)
Common Procedure Errors
360(1)
Creating Procedures in Modules
361(1)
Introduction to Sub Procedures
362(5)
Creating Sub Procedures
363(1)
Calling Sub Procedures
364(3)
Introduction to Applications with Multiple Modules
367(5)
Organization of an Application with Multiple Modules
367(1)
Adding a Form Module to an Application
368(1)
Setting the Start-Up Object for a Multiform Application
369(3)
Creating and Displaying Multiple Form Instances
372(7)
Creating a Form Instance
372(2)
Displaying Forms
374(1)
Hiding and Closing a Form
375(1)
Introduction to Form Events
376(3)
Communicating Data Between Forms
379(3)
Reviewing the Accessibility of Private Data
380(1)
The Accessibility of Friend Data
380(1)
The Accessibility of Public Data
381(1)
Introduction to Property Procedures
382(6)
Creating Read-Only Properties
385(1)
Creating Write-Only Properties
386(2)
Creating Reusable Applications with Custom Classes
388(14)
Introduction to Class Design
389(3)
Introduction to Constructors
392(2)
The Difference Between Class and Module Blocks
394(1)
Understanding the Difference Between Shared Data and Instance Data
394(2)
Creating Methods
396(2)
Creating Fields and Properties
398(4)
Application Lesson
402(1)
Creating an Application to Support Business Processes
402(7)
Application Lesson--User Interface
402(1)
Application Lesson--Design
403(2)
Application Lesson--Implementation
405(4)
Chapter Summary
409(1)
Key Terms
410(1)
Answers to Mini-Quizzes
411(1)
Review Questions
412(3)
Programming Questions
415(2)
Hands-On Projects
417(6)
Decision Making
423(74)
Concept Lesson
424(1)
Introduction to Decision-Making
424(1)
Introduction to Boolean Data
424(1)
Introduction to Decision-Making
425(19)
Using If Statements and Comparison Operators
426(3)
Comparison Operations Involving Dates
429(1)
Comparison Operations on Numeric Data Types
430(1)
Comparison Operations on Strings
430(1)
Two-Way If Statements
431(3)
Multiway If Statements
434(4)
Nested If Statements
438(2)
The Select Case Statement
440(4)
Logical Operators
444(6)
The Messagebox Class
450(3)
The Inputbox Class
453(2)
Decision-Making and Input Validation
455(5)
Applying Input Validation Concepts
457(3)
Introduction to Structured Exception Handling
460(7)
The Syntax of a Structured Exception Handler
460(2)
Understanding Different Types of Exceptions
462(3)
Throwing an Exception
465(2)
Controls That Rely on Decision-Making
467(5)
The CheckBox Control
467(2)
The HScrollBar and VScrollBar Controls
469(3)
Control Groups
472(4)
The GroupBox Control
472(1)
The RadioButton Control
473(3)
Application Lesson
476(1)
Creating a Decision-Making Application to Calculate the Cost of a Car Rental
476(6)
Application Lesson--User Interface
476(1)
Application Lesson--Design
477(1)
Application Lesson--Implementation
478(4)
Chapter Summary
482(1)
Key Terms
483(1)
Answers to Mini-Quizzes
484(1)
Review Questions
485(4)
Programming Questions
489(2)
Hands-On Projects
491(6)
Using Repetition With Loops and Lists
497(66)
Concept Lesson
498(1)
Introduction to Loops
498(1)
Executing Statements Repeatedly
498(11)
Do While and Do Until Loops
499(3)
Post-Test Do Loops
502(7)
For Loops
509(5)
Execution of a For Loop
510(1)
The Implications of Long-Running Loops
511(3)
Using Collections to Store Repeating Data Items
514(14)
General Characteristics of Lists
515(1)
Methods and Properties of Collections
515(1)
Creating a List
516(1)
Adding Items to a Collection
516(3)
Referencing a List Item
519(1)
Updating a Collection Item
520(2)
Deleting a Collection Item
522(1)
Determining the Size and Capacity of a Collection
523(1)
Enumerating a Collection with a For Loop
523(1)
Enumerating a Collection with a For Each Loop
524(1)
Introduction to Predefined Collections
525(3)
Introduction to Controls Involving Loops
528(7)
Introduction to the ComboBox Control
530(1)
Introduction to the ListBox Control
531(1)
Working with a ComboBox or ListBox
531(4)
Introduction to the Datagridview Control
535(6)
Working with a DataGridView Control
536(3)
Using Loops to Examine the Cells in a DataGridView Control Instance
539(2)
Application Lesson
541(9)
Application Lesson--User Interface
541(2)
Application Lesson--Design
543(2)
Application Lesson--Implementation
545(5)
Chapter Summary
550(1)
Key Terms
551(1)
Answers to Mini-Quizzes
551(2)
Review Questions
553(4)
Programming Questions
557(2)
Hands-On Projects
559(4)
Processing Lists with Arrays
563(68)
Concept Lesson
564(1)
Introduction to Random Numbers
564(5)
Random Number Generation
564(1)
The Next Method
565(1)
The NextDouble Method
566(3)
Introduction to Arrays
569(2)
Characteristics of Arrays
570(1)
The Array Class
570(1)
Common Array Tasks
571(10)
Declaring Arrays
572(2)
Initializing an Array
574(2)
Determining an Array's Bounds
576(1)
Redimensioning an Array
576(2)
Performing Assignment Statements with Arrays
578(3)
Using Loops to Examine Array Elements
581(5)
Calculating the Total Value of an Array's Elements
582(1)
Determining the Minimum Value of an Array Element
583(1)
Determining the Maximum Value of an Array Element
584(1)
Determining the Average Value of an Array's Elements
584(1)
Arrays as Function Arguments
585(1)
Sorting and Reversing Array Elements
586(4)
Sorting Elements
586(1)
Reversing Elements
587(1)
Using Sorting and Reversing Together
587(3)
Introduction to Searching
590(6)
Searching for an Array Item in an Unordered Array with a Sequential Search
590(2)
Searching for an Array Item in a Sorted Array Using a Binary Search
592(4)
Common Array Errors
596(2)
Errors Arising from Omitting an Array Subscript
597(1)
Subscript Out of Range Errors
597(1)
Logic Errors That Arise when Examining Array Elements
597(1)
Introduction to Multidimensional Arrays
598(4)
Introduction to Two-Dimensional Arrays
598(1)
Initializing Two-Dimensional Arrays
598(1)
Referencing Elements in a Two-Dimensional Array
599(1)
Redimensioning Two-Dimensional Arrays
600(1)
Introduction to Three-Dimensional Arrays
600(1)
Referencing the Elements in a Three-Dimensional Array
601(1)
Working with Arrays of Objects
602(4)
Application Lesson
606(10)
Creating a Keno Game in Visual Studio
606(1)
Application Lesson--User Interface
607(1)
Application Lesson--Design
607(2)
Application Lesson--Implementation
609(7)
Chapter Summary
616(1)
Key Terms
617(1)
Answers to Mini-Quizzes
618(2)
Review Questions
620(4)
Programming Questions
624(3)
Hands-on Projects
627(4)
Sequential Files and Structures
631(64)
Concept Lesson
632(1)
Doing More with the Openfiledialog and Savefiledialog Controls
632(5)
Setting the Filter for an OpenFileDialog
635(1)
Using the SaveFileDialog Control
636(1)
Introduction to the Folderbrowserdialog Control
637(5)
Using Windows Defined Directories
638(1)
Using Application-Defined Directories
639(3)
Introduction to Processing Textual Data
642(3)
Understanding the Format of Freeform Files
643(1)
Understanding the Format of Delimited Files
643(1)
Introduction to Fixed-Field Files
644(1)
Opening and Closing Sequential Files with the Streamreader Class
645(1)
Opening a Sequential File
645(1)
Closing a Sequential File
646(1)
Reading a File Using the Members of the Streamreader Class
646(14)
Reading the Entire Contents of a File
647(1)
Reading a Sequential File Character by Character
648(3)
Reading a Sequential File One Record at a Time
651(6)
Common Sequential File Errors
657(3)
Writing a Sequential File with the Streamwriter Class
660(3)
Writing a Freeform File
661(1)
Writing a Delimited File
661(2)
Introduction to Structures
663(8)
Declaring a Structure Variable
665(1)
Storing and Retrieving Data from a Structure
665(1)
Using the With Statement to Reference Structure Members
666(1)
Control Structures and With Blocks
667(1)
Using Arrays of Structures
667(1)
Processing Delimited Files Using Arrays of Structures
668(3)
Application Lesson
671(1)
Creating a Customer List Manager
671(8)
Application Lesson--User Interface
672(1)
Application Lesson--Design
672(1)
Application Lesson--Implementation
673(6)
Chapter Summary
679(2)
Key Terms
681(1)
Answers to Mini-Quizzes
681(1)
Review Questions
682(6)
Programming Questions
688(2)
Hands-On Projects
690(5)
Introduction to Database Processing
695(72)
Concept Lesson
696(1)
Characteristics of a Database and Database Management Systems
696(3)
Database Tables and Fields
696(2)
Introduction to Database Management Systems (DBMS)
698(1)
An Overview of Ado.Net
699(1)
Using a Visual Studio Wizard to Work With a Database
700(13)
Understanding the Concept of a Data Source
700(1)
Creating a Connection with the Data Source Configuration Wizard
701(1)
Creating and Binding Control Instances Using the Data Source Configuration Wizard
702(11)
Understanding How the Data Source Configuration Wizard Creates and Manages a Data Source
713(15)
Introduction to Connection Strings
714(2)
Introduction to the TableAdapter and OleDbDataAdapter Classes
716(4)
Introduction to the BindingSource Class
720(2)
Introduction to the BindingNavigator Class
722(2)
Binding the Form's Control Instances with the Binding Class
724(4)
Introduction to the Untyped Dataset and Datatable Classes
728(7)
Introduction to the Untyped DataTable Class
728(1)
Introduction to the Untyped DataRow Class
729(2)
Introduction to the DataColumn Class
731(4)
Introduction to Strongly Typed Datasets, Datatables, and Datarows
735(6)
Strongly Typed DataSets and DataTables
735(2)
Strongly Typed DataRows
737(4)
Application Lesson
741(1)
Creating an Accounts Receivable Aging System
741(9)
Application Lesson--User Interface
743(1)
Application Lesson--Design
743(1)
Application Lesson--Implementation
744(6)
Chapter Summary
750(2)
Key Terms
752(1)
Answers to Mini-Quizzes
753(1)
Review Questions
754(4)
Programming Questions
758(2)
Hands-On Projects
760(7)
Drawing and Mouse Events
767(56)
Concept Lesson
768(1)
Introduction to Drawing
768(3)
Introduction to the Paint Event
768(1)
The Classes and Structures of the GDI
769(1)
Drawing a First Shape on a Form
769(2)
Understanding the Paint Event
771(1)
Understanding Color
771(5)
Creating Custom Colors
772(2)
The ColorDialog Control
774(2)
Introduction to Pens and Brushes
776(5)
Using Pens to Outline Shapes
777(1)
Using Brushes to Fill Shapes
778(3)
Creating and Drawing Lines and Rectangles
781(8)
The Point and Size Structures
782(1)
The Size Structure
783(1)
Drawing Rectangles
784(1)
Painting Rectangles on a Drawing Surface
785(1)
Drawing Lines
786(3)
Creating and Drawing Elliptical Shapes
789(5)
Drawing and Filling Ellipses
789(1)
Drawing Arcs
790(2)
Creating a Pie Shape
792(2)
Drawing Images
794(4)
Introduction to Mouse Events
798(5)
Application Lesson
803(1)
Creating a Drawing Application
803(9)
Application Lesson--User Interface
803(1)
Application Lesson--Design
804(1)
Application Lesson--Implementation
805(7)
Chapter Summary
812(1)
Key Terms
813(1)
Answers to Mini-Quizzes
813(1)
Review Questions
814(4)
Programming Questions
818(2)
Hands-On Projects
820(3)
Additional Windows Controls
823(56)
Concept Lesson
824(1)
Working with Additional Windows Controls
824(1)
Understanding the Purpose of Container Controls
824(1)
Creating Menus
825(14)
Introduction to the MenuStrip Class
827(1)
Introduction to the ToolStripMenuItem Class
827(1)
Creating Menu Titles
828(3)
Modifying a Menu System
831(2)
Adding Images to Menu Items
833(2)
Creating Event Handlers for Menus
835(1)
Creating Context Menus
836(3)
Creating a Toolbar
839(4)
The ToolStripButton Class
841(1)
The ToolStripSeparator Class
841(1)
The ToolStripProgressBar Class
842(1)
The ToolStripComboBox, ToolStripTextBox, and ToolStripLabel Classes
842(1)
Introduction to the Statusstrip
843(5)
The ToolStripStatusLabel Class
844(1)
Displaying the Status of Keyboard Keys on a Status Bar
845(3)
Advanced Text Processing Controls
848(10)
The MaskedTextBox Control
848(5)
Using the RichTextBox Control
853(5)
Application Lesson
858(1)
Creating a Basic Word Processor
858(8)
Application Lesson--User Interface
858(1)
Application Lesson--Design
858(1)
Application Lesson--Implementation
859(7)
Chapter Summary
866(1)
Key Terms
867(1)
Answers to Mini-Quizzes
868(1)
Review Questions
869(4)
Programming Questions
873(1)
Hands-On Projects
874(5)
APPENDIX A DEBUGGING
879(22)
Debugging Applications
880(1)
Types of Programming Errors
880(6)
Syntax Errors
880(2)
Run-Time Errors
882(3)
Logic Errors
885(1)
Introducing the Visual Studio Debugging Tools
886(12)
Tracing Execution and Setting Breakpoints with the Breakpoints Window
887(6)
Using the Immediate Window
893(1)
Setting Watch Expressions with the Watch Windows
894(1)
The Call Stack Window
895(2)
The Locals Window
897(1)
Other Debugging Windows
898(1)
Appendix Summary
899(1)
Key Terms
899(2)
APPENDIX B ASCII CHART
901(2)
Index
Index 903

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