Starting Out with Visual Basic.NET teaches Visual Basic.NET from the ground up and assumes no prior background in programming. This book provides an introduction to Visual Basic .NET, using slow-paced discussion to help readers with no previous programming experience master the concepts that lead to success with VB.NET. This book is designed for readers with little or no background in programming who want to learn the VB.NET language.
Preface
Chapter 1 Introduction to Programming and Visual Basic 2008
1.1 Computer Systems: Hardware and Software
1.2 Programs and Programming Languages
TUTORIAL 1-1: Running an application that demonstrates objects
TUTORIAL 1-2: Running an application that demonstrates event procedures
1.3 More about Controls and Programming
TUTORIAL 1-3: Running an application that demonstrates various controls
1.4 The Programming Process
1.5 Visual Studio and Visual Basic Express (the Visual Basic Environment)
TUTORIAL 1-4: Starting Visual Studio
TUTORIAL 1-5: Opening the Design, Solution Explorer, Dynamic Help, and Properties windows in Visual Studio
TUTORIAL 1-6: Getting familiar with Visual Studio
Chapter 2 Creating Applications with Visual Basic
2.1 Focus on Problem Solving: Building the Directions Application
TUTORIAL 2-1: Beginning the Directions application
TUTORIAL 2-2: Adding a Label control
TUTORIAL 2-3: Setting the Label’s TextAlign property
TUTORIAL 2-4: Changing the Label’s font size and style
TUTORIAL 2-5: Deleting a control
TUTORIAL 2-6: Inserting a PictureBox control
TUTORIAL 2-7: Saving and running the application
TUTORIAL 2-8: Closing a Visual Basic project
TUTORIAL 2-9: Opening an existing project
TUTORIAL 2-10: Using the Object box, Alphabetical button, and Categorized button
2.2 Focus on Problem Solving: Responding to Events
TUTORIAL 2-11: Placing the lblDirections, btnDisplayDirections, and btnExit controls
TUTORIAL 2-12: Writing event procedures for the Directions application
TUTORIAL 2-13: Changing the text colors
TUTORIAL 2-14: Setting the FormBorderStyle property and locking the controls
2.3 Modifying the Text Property with Code
TUTORIAL 2-15: Examining an application that displays messages
2.4 The AutoSize, BorderStyle, and TextAlign Properties
2.5 Clickable Images
TUTORIAL 2-16: Writing Click event procedures for PictureBox controls
2.6 Using Visual Basic Help
TUTORIAL 2-17: Using Visual Basic Help
2.7 Debugging Your Application
TUTORIAL 2-18: Locating a compile error in Design mode
Chapter 3 Input, Variables, Exceptions, and Calculations
3.1 Gathering Text Input
TUTORIAL 3-1: Using a TextBox control
3-2: Building the Date String application
TUTORIAL 3-3: Using the Focus method
TUTORIAL 3-4: Changing the tab order
TUTORIAL 3-5: Setting access keys, accept, and cancel buttons
3.2 Variables
TUTORIAL 3-6: Assigning text to a variable
3.3 Performing Calculations and Working with Numbers
TUTORIAL 3-7: Examining a Simple Calculator application
3.4 Exception Handling
TUTORIAL 3-8: Salary Calculation program with exception handling
3.5 Formatting Numbers for Output
TUTORIAL 3-9: Examining the Format Demo application
3.6 Group Boxes and the Load Event Procedure
3.7 Focus on Program Design and Problem Solving: Building the Room Charge Calculator Application
TUTORIAL 3-10: Beginning the Room Charge Calculator application
TUTORIAL 3-11: Changing a label’s colors
3.8 More about Debugging: Locating Logic Errors
TUTORIAL 3-12: Single-stepping through an application’s execution
Chapter 4 Making Decisions and Working with Strings
4.1 The Decision Structure
4.2 The If...Then Statement
TUTORIAL 4-1: Examining an application that uses the If...Then statement
4.3 The If...Then...Else Statement
TUTORIAL 4-2: Completing an application that uses the If...Then...Else statement
4.4 The If...Then...ElseIf Statement
TUTORIAL 4-3: Completing an application that uses the If...Then...ElseIf statement
TUTORIAL 4-4: Comparing an If...Then...ElseIf statement to a series of If...Then statements
4.5 Nested If Statements
TUTORIAL 4-5: Completing an application with a nested If statement
4.6 Logical Operators
4.7 Comparing, Testing, and Working with Strings
TUTORIAL 4-6: Examining an application that performs string comparisons
TUTORIAL 4-7: Completing a string searching application
4.8 Focus on GUI Design: The Message Box
4.9 The Select Case Statement
TUTORIAL 4-8: Examining Crazy Al’s Sales Commission Calculator application
4.10 Introduction to Input Validation
4.11 Focus on GUI Design: Radio Buttons and Check Boxes
TUTORIAL 4-9: Completing an application with radio buttons and check boxes
4.12 Class-Level Variables
4.13 Focus on Program Design and Problem Solving: Building the Health Club Membership Fee Calculator Application
TUTORIAL 4-10: Building the Health Club Membership Fee Calculator application
Chapter 5 Lists, Loops, Validation, and More
5.1 Input Boxes
5.2 List Boxes
TUTORIAL 5-1: Creating list boxes
5.3 Introduction to Loops: The Do While Loop
TUTORIAL 5-2: Completing an application that uses the Do While loop
TUTORIAL 5-3: Modifying the Do While Loop Demo program to use a posttest loop
TUTORIAL 5-4: Using a loop to keep a running total
TUTORIAL 5-5: Examining an application that uses a user-controlled loop
5.4 The Do Until and For...Next Loops
TUTORIAL 5-6: Examining an application that uses the Do Until loop
TUTORIAL 5-7: Examining an application that uses the For...Next loop
TUTORIAL 5-8: Completing an application that uses the For...Next loop
5.5 Nested Loops
5.6 Multicolumn List Boxes, Checked List Boxes, and Combo Boxes
TUTORIAL 5-9: Creating combo boxes
5.7 Input Validation
TUTORIAL 5-10: Completing an application that demonstrates input validation
TUTORIAL 5-11: An example of inconvenient data input correction
TUTORIAL 5-12: Modifying the Validation Demo project to use the SelectAll method
5.8 ToolTips
TUTORIAL 5-13: Adding ToolTips to an application
5.9 Focus on Program Design and Problem Solving: Building the Vehicle Loan Calculator Application
TUTORIAL 5-14: Building the Loan Calculator application
Chapter 6 Sub Procedures and Functions
6.1 Sub Procedures
TUTORIAL 6-1: Examining an application with a Sub procedure
TUTORIAL 6-2: Creating a Sub procedure
6.2 Passing Arguments to Procedures
TUTORIAL 6-3: Examining an application that demonstrates passing an argument to a procedure
TUTORIAL 6-4: Working with ByVal and ByRef
6.3 Function Procedures
TUTORIAL 6-5: Examining the GPA Calculator application
6.4 More about Debugging: Stepping Into, Over, and Out of Procedures and Functions
TUTORIAL 6-6: Practicing the Step Into, Step Over, and Step Out commands
6.5 Focus on Program Design and Problem Solving: Building the Bagel and Coffee Price Calculator Application
TUTORIAL 6-7: Building the Bagel House application
Chapter 7 Multiple Forms, Standard Modules, and Menus
7.1 Multiple Forms
TUTORIAL 7-1: Completing an application that displays modal and modeless forms
TUTORIAL 7-2: Completing an application with multiple forms
7.2 Standard Modules
TUTORIAL 7-3: Examining an application that uses a standard module
7.3 Menus
TUTORIAL 7-4: Building a menu
7.4 Focus on Problem Solving: Building the High Adventure Travel Agency Price Quote Application
TUTORIAL 7-5: Building the High Adventure Travel Agency Price Quote application
Chapter 8 Arrays, Timers, and More
8.1 Arrays
TUTORIAL 8-1: Completing an application that uses an array
8.2 More about Array Processing
TUTORIAL 8-2: Examining an application that uses parallel arrays
8.3 Sub Procedures and Functions That Work with Arrays
TUTORIAL 8-3: Examining an application with functions and with arrays
8.4 Multidimensional Arrays
TUTORIAL 8-4: Completing an application that sums the rows of a two-dimensional array
8.5 Focus on GUI Design: The Enabled Property, Timer Control, and Splash Screens
TUTORIAL 8-5: The Timer Demo
TUTORIAL 8-6: Creating a splash screen
8.6 Focus on GUI Design: Anchoring and Docking Controls
8.7 Random Numbers
TUTORIAL 8-7: Examining the CatchMe Program
8.8 Focus on Problem Solving: Building the Demetris Leadership Center Application
TUTORIAL 8-8: Building the Demetris Leadership Center Sales Reporting application
Chapter 9 Files, Printing, and Structures
9.1 Using Files
TUTORIAL 9-1: Completing an application that writes data to a file
TUTORIAL 9-2: Completing an application that reads a file
TUTORIAL 9-3: Examining an application that detects the end of a file
9.2 The OpenFileDialog, SaveFileDialog, FontDialog, and ColorDialog Controls
TUTORIAL 9-4: Creating a simple text editor application
9.3 The PrintDocument Control
TUTORIAL 9-5: Adding printing capabilities to the Simple Text Editor application
9.4 Structures
TUTORIAL 9-6: Examining an application with a structure
9.5 Focus on Problem Solving: Modifying the Demetris Leadership Center Application
TUTORIAL 9-7: Modifying the Demetris Leadership Center Sales-Reporting application
Chapter 10 Working with Databases
10.1 What Is a Database?
10.2 Using the DataGridView
TUTORIAL 10-1: Showing a database table in a DataGridView control
10.3 Selecting Dataset Rows
TUTORIAL 10-2: Filtering rows in the SalesStaff table
10.4 Data-Bound Controls
TUTORIAL 10-3: Displaying the Members table in a list box
TUTORIAL 10-4: Inserting Karate student payments
TUTORIAL 10-5: Adding a total to the Karate student payments
10.5 Structured Query Language (SQL)
10.6 Focus on Problem Solving: Karate School Management Application
TUTORIAL 10-6: Creating the Karate School Manager startup window
TUTORIAL 10-7: Adding the Membership/List all function to the Karate School Manager
TUTORIAL 10-8: Adding the Membership/Add new member function to the Karate School Manager
TUTORIAL 10-9: Adding the Membership/Find member function to the Karate School Manager
TUTORIAL 10-10: Adding the Payments/All members function to the Karate School Manager
TUTORIAL 10-11: Adding the Payments/One member function to the Karate School Manager
Chapter 11 Developing Web Applications
11.1 Programming for the Web
11.2 Creating ASP.NET Applications
TUTORIAL 11-1: Creating the Click application
11.3 Web Server Controls
TUTORIAL 11-2: Student Picnic program
11.4 Designing Web Forms
TUTORIAL 11-3: Signing up for a Kayak Tour
11.5 Applications with Multiple Web Pages
TUTORIAL 11-4: Adding a description form to the Kayak Tour program
11.6 Using Databases
TUTORIAL 11-5: Displaying the Karate Members table in a GridView
TUTORIAL 11-6: Updating the Karate Members table
Chapter 12 Classes, Exceptions, Collections, and Scrollable Controls
12.1 Classes and Objects
12.2 Creating a Class
TUTORIAL 12-1: Creating the Student Data application
12.3 Collections
12.4 Focus on Problem Solving: Creating the Student Collection Application
TUTORIAL 12-2: Completing the Student Collection program
12.5 The Object Browser
TUTORIAL 12-3: Using the Object Browser
12.6 Focus on GUI Design: Scroll Bars and Track Bars
TUTORIAL 12-4: Working with scrollable controls
12.7 Introduction to Inheritance
TUTORIAL 12-5: Completing an application that uses inheritance
Appendices
A User Interface Design Guidelines
B Converting Mathematical Expressions to Programming Statements
C Answers to Checkpoints
D Glossary
E Visual Basic 2005 Function and Method Reference (located on the Student CD-ROM)
F Binary and Random-Access Files (located on the Student CD-ROM)
G Answers to Odd-Numbered Review Questions (located on the Companion Website
Index