| |
| |
Acknowledgments | |
| |
| |
Introduction | |
| |
| |
Visual Basic Versions | |
| |
| |
Finding Your Best Starting Point in This Book | |
| |
| |
Hardware and Software Requirements | |
| |
| |
Prerelease Software | |
| |
| |
Installing and Using the Practice Files | |
| |
| |
Uninstalling the Practice Files | |
| |
| |
Conventions and Features in This Book | |
| |
| |
Helpful Support Links | |
| |
| |
Support for This Book; | |
| |
| |
| |
Getting Started with Microsoft Visual Basic 2010 | |
| |
| |
| |
Exploring the Visual Studio Integrated Development Environment | |
| |
| |
| |
The Visual Studio Development Environment | |
| |
| |
| |
The Visual Studio Tools | |
| |
| |
| |
The Properties Window | |
| |
| |
| |
Moving and Resizing the Programming Tools | |
| |
| |
| |
Switching Among Open Files and Tools by Using the IDE Navigator | |
| |
| |
| |
Opening a Web Browser Within Visual Studio | |
| |
| |
| |
Getting Help | |
| |
| |
| |
Customizing IDE Settings to Match Step-by-Step Exercises | |
| |
| |
| |
One Step Further: Exiting Visual Studio | |
| |
| |
| |
Chapter 1 Quick Reference | |
| |
| |
| |
Writing Your First Program | |
| |
| |
| |
Lucky Seven: Your First Visual Basic Program | |
| |
| |
| |
Programming Steps | |
| |
| |
| |
Creating the User Interface | |
| |
| |
| |
Setting the Properties | |
| |
| |
| |
The Picture Box Properties | |
| |
| |
| |
Writing the Code | |
| |
| |
| |
A Look at the Button1_Click Procedure | |
| |
| |
| |
Running Visual Basic Applications | |
| |
| |
| |
Sample Projects on Disk | |
| |
| |
| |
Building an Executable File | |
| |
| |
| |
Deploying Your Application | |
| |
| |
| |
One Step Further: Adding to a Program | |
| |
| |
| |
Chapter 2 Quick Reference | |
| |
| |
| |
Working with Toolbox Controls | |
| |
| |
| |
The Basic Use of Controls: The Hello World Program | |
| |
| |
| |
Using the DateTimePicker Control | |
| |
| |
| |
Controls for Gathering Input | |
| |
| |
| |
One Step Further: Using the LinkLabel Control | |
| |
| |
| |
Chapter 3 Quick Reference | |
| |
| |
| |
Working with Menus, Toolbars, and Dialog Boxes | |
| |
| |
| |
Adding Menus by Using the MenuStrip Control | |
| |
| |
| |
Adding Access Keys to Menu Commands | |
| |
| |
| |
Processing Menu Choices | |
| |
| |
| |
Adding Toolbars with the ToolStrip Control | |
| |
| |
| |
Using Dialog Box Controls | |
| |
| |
| |
Event Procedures That Manage Common Dialog Boxes | |
| |
| |
| |
One Step Further: Assigning Shortcut Keys to Menus | |
| |
| |
| |
Chapter 4 Quick Reference; | |
| |
| |
| |
Programming Fundamentals | |
| |
| |
| |
Visual Basic Variables and Formulas and the .NET Framework | |
| |
| |
| |
The Anatomy of a Visual Basic Program Statement | |
| |
| |
| |
Using Variables to Store Information | |
| |
| |
| |
Using Variables in a Program | |
| |
| |
| |
Using a Variable to Store Input | |
| |
| |
| |
Using a Variable for Output | |
| |
| |
| |
Working with Specific Data Types | |
| |
| |
| |
Working with Visual Basic Operators | |
| |
| |
| |
Working with Math Methods in the .NET Framework | |
| |
| |
| |
One Step Further: Establishing Order of Precedence | |
| |
| |
| |
Chapter 5 Quick Reference | |
| |
| |
| |
Using Decision Structures | |
| |
| |
| |
Event-Driven Programming | |
| |
| |
| |
Using Conditional Expressions | |
| |
| |
| |
If … Then Decision Structures | |
| |
| |
| |
Select Case Decision Structures | |
| |
| |
| |
One Step Further: Detecting Mouse Events | |
| |
| |
| |
Chapter 6 Quick Reference | |
| |
| |
| |
Using Loops and Timers | |
| |
| |
| |
Writing For … Next Loops | |
| |
| |
| |
Using a Counter Variable in a Multiline TextBox Control | |
| |
| |
| |
Creating Complex For … Next Loops | |
| |
| |
| |
Writing Do Loops | |
| |
| |
| |
Avoiding an Endless Loop | |
| |
| |
| |
The Timer Control | |
| |
| |
| |
Creating a Digital Clock by Using a Timer Control | |
| |
| |
| |
Using a Timer Object to Set a Time Limit | |
| |
| |
| |
One Step Further: Inserting Code Snippets | |
| |
| |
| |
Chapter 7 Quick Reference | |
| |
| |
| |
Debugging Visual Basic Programs | |
| |
| |
| |
Finding and Correcting Errors | |
| |
| |
| |
Three Types of Errors | |
| |
| |
| |
Identifying Logic Errors | |
| |
| |
| |
Debugging 101: Using Debugging Mode | |
| |
| |
| |
Tracking Variables by Using a Watch Window | |
| |
| |
| |
Visualizers: Debugging Tools That Display Data | |
| |
| |
| |
Using the Immediate and Command Windows | |
| |
| |
| |
Switching to the Command Window | |
| |
| |
| |
One Step Further: Removing Breakpoints | |
| |
| |
| |
Chapter 8 Quick Reference | |
| |
| |
| |
Trapping Errors by Using Structured Error Handling | |
| |
| |
| |
Processing Errors by Using the Try … Catch Statement | |
| |
| |
| |
Writing a Disc Drive Error Handler | |
| |
| |
| |
Using the Finally Clause to Perform Cleanup Tasks | |
| |
| |
| |
More Complex Try … Catch Error Handlers | |
| |
| |
| |
Comparing Error Handlers with Defensive Programming Techniques | |
| |
| |
| |
One Step Further: The Exit Try Statement | |
| |
| |
| |
Chapter 9 Quick Reference | |
| |
| |
| |
Creating Modules and Procedures | |
| |
| |
| |
Working with Modules | |
| |
| |
| |
Working with Public Variables | |
| |
| |
| |
Creating Procedures | |
| |
| |
| |
Writing Function Procedures | |
| |
| |
| |
Writing Sub Procedures | |
| |
| |
| |
One Step Further: Passing Arguments by Value and by Reference | |
| |
| |
| |
Chapter 10 Quick Reference | |
| |
| |
| |
Using Arrays to Manage Numeric and String Data | |
| |
| |
| |
Working with Arrays of Variables | |
| |
| |
| |
Preserving Array Contents by Using ReDim Preserve | |
| |
| |
| |
One Step Further: Processing Large Arrays by Using Methods in the Array Class | |
| |
| |
| |
Chapter 11 Quicccccck Reference | |
| |
| |
| |
Working with Collections | |
| |
| |
| |
Working with Object Collections | |
| |
| |
| |
Creating Your Own Collections | |
| |
| |
| |
One Step Further: VBA Collections | |
| |
| |
| |
Chapter 12 Quick Reference | |
| |
| |
| |
Exploring Text Files and String Processing | |
| |
| |
| |
Reading Text Files | |
| |
| |
| |
Writing Text Files | |
| |
| |
| |
Processing Strings with the String Class | |
| |
| |
| |
Sorting Text | |
| |
| |
| |
Protecting Text with Basic Encryption | |
| |
| |
| |
One Step Further: Using the Xor Operator | |
| |
| |
| |
Chapter 13 Quick Reference; | |
| |
| |
| |
Designing the User Interface | |
| |
| |
| |
Managing Windows Forms and Controls at Run Time | |
| |
| |
| |
Adding New Forms to a Program | |
| |
| |
| |
How Forms Are Used | |
| |
| |
| |
Working with Multiple Forms | |
| |
| |
| |
Positioning Forms on the Windows Desktop | |
| |
| |
| |
Adding Controls to a Form at Run Time | |
| |
| |
| |
Organizing Controls on a Form | |
| |
| |
| |
One Step Further: Specifying the Startup Object | |
| |
| |
| |
Chapter 14 Quick Reference | |
| |
| |
| |
Adding Graphics and Animation Effects | |
| |
| |
| |
Adding Artwork by Using the System.Drawing Namespace | |
| |
| |
| |
Adding Animation to Your Programs | |
| |
| |
| |
Expanding and Shrinking Objects While a Program is Running | |
| |
| |
| |
One Step Further: Changing Form Transparency | |
| |
| |
| |
Chapter 15 Quick Reference | |
| |
| |
| |
Inheriting Forms and Creating Base Classes | |
| |
| |
| |
Inheriting a Form by Using the Inheritance Picker | |
| |
| |
| |
Creating Your Own Base Classes | |
| |
| |
| |
One Step Further: Inheriting a Base Class | |
| |
| |
| |
Chapter 16 Quick Reference | |
| |
| |
| |
Working with Printers | |
| |
| |
| |
Using the PrintDocument Class | |
| |
| |
| |
Printing Multipage Text Files | |
| |
| |
| |
One Step Further: Adding Print Preview and Page Setup Dialog Boxes | |
| |
| |
| |
Chapter 17 Quick Reference; | |
| |
| |
| |
Database and Web Programming | |
| |
| |
| |
Getting Started with ADO .NET | |
| |
| |
| |
Database Programming with ADO.NET | |
| |
| |
| |
Using Bound Controls to Display Database Information | |
| |
| |
| |
One Step Further: SQL Statements, LINQ, and Filtering Data | |
| |
| |
| |
Chapter 18 Quick Reference | |
| |
| |
| |
Data Presentation Using the DataGridView Control | |
| |
| |
| |
Using DataGridView to Display Database Records | |
| |
| |
| |
Formatting DataGridView Cells | |
| |
| |
| |
Adding a Second Data Grid View Object | |
| |
| |
| |
One Step Further: Updating the Original Database | |
| |
| |
| |
Chapter 19 Quick Reference | |
| |
| |
| |
Creating Web Sites and Web Pages by Using Visual Web Developer and ASP.NET | |
| |
| |
| |
Inside ASP.NET | |
| |
| |
| |
Building a Web Site by Using Visual Web Developer | |
| |
| |
| |
Using the Web Page Designer | |
| |
| |
| |
Adding Server Controls to a Web Site | |
| |
| |
| |
Customizing the Web Site Template | |
| |
| |
| |
Displaying Database Records on a Web Page | |
| |
| |
| |
One Step Further: Setting Web Site Titles in Internet Explorer | |
| |
| |
| |
Chapter 20 Quick Reference; Where to Go for More Information | |
| |
| |
Visual Basic Web Sites | |
| |
| |
Video Web Sites | |
| |
| |
Books about Visual Basic and Visual Studio Programming | |