|
Faster Smarter Beginning Programming
Take charge of Microsoft Visual Basic - faster, smarter, better!
Now you can write your own programs with Microsoft Visual Basic .NET - faster, smarter, and better. Dive in - this friendly, high-energy guide makes it easy to learn exactly what you need. Use the numbered steps, code listings, and expert tips to accelerate your programming
productivity - and move on to doing the cool things you want to do!
* Learn basic concepts, syntax, and language elements
* Follow easy coding techniques to build your dexterity
* Write and run your first Visual Basic .NET program
* Use built-in functions and classes or create your own
* Design the user interface with Windows Forms
* Program Web applications using Microsoft ASP.NET
* Access files and databases
* Debug and deploy your new programs
Table of Contents:
Acknowledgments xi
Introduction xiii
CHAPTER 1: Introducing Basic Concepts
How Program Code and Data Occupy Memory
Appreciating Data Types
High-Level Languages
The Concept of Layered Software
Structured Programming Constructs
Top-Down Design
Subroutines and Functions
Processing Events
Classes and Objects
Key Points
CHAPTER 2: Introducing Microsoft Visual Basic .NET
Preparing Your System
Preparing for .NET Windows Applications
Preparing for .NET Web Applications
Sizing Your Computer
Obtaining Visual Basic .NET
Installing Visual Basic .NET
Easing into Visual Basic .NET
Manipulating Visual Studio Windows
Help, More Help, and Beyond Help
Understanding Visual Basic .NET Syntax
Writing and Running Your First Program
Key Points
CHAPTER 3: Using Elementary Statements
Using Data Types
Using Literals
Using Variables
Using Constants
Option Explicit and Option Strict
Working with Arrays
Scoping Out Variables
Writing Decision Statements
Writing Loops
Coding Loops with DoLoop Statements
Coding Loops with ForNext Statements
Coding Loops with WhileEnd While Statements
Example: Writing a Tape Calculator
Key Points
CHAPTER 4: Using Operators and Expressions
Introducing Operators
Forming Expressions
Using Arithmetic Operators
Converting Numeric Types
Using Assignment Operators
Using Compound Operators
Understanding Type Conversion
Assigning Reference Variables
Using Comparison Operators
Comparing Numbers
Comparing Strings
Using the Like Operator
Getting It Together with Concatenation Operators
Using Logical Operators
Using Short-Circuited Operators
Using Bitwise Operators
Using Miscellaneous Operators
Testing Operators and Expressions
Key Points
CHAPTER 5: Using Functions and Subroutines
Introducing Functions and Subroutines
Coding Your Own Functions and Subroutines
Declaring Arguments
Passing Arguments by Value
Passing Arguments by Reference
Sidestepping Arguments
Specifying Return Values
Exiting Functions and Subroutines
Functions, Subroutines, Variables, and Scope
Designing Functions and Subroutines Effectively
Example: Writing a Four-Function Calculator
Key Points
CHAPTER 6: Using Built-In Functions
Finding Built-In Functions
Using Type Conversion Functions
Logical Functions
Manipulating Dates
Manipulating Strings
Using Array Functions
Generating Random Numbers
Example: Shuffling Cards
Initialize the Deck
Shuffle the Cards
Key Points
CHAPTER 7: Creating Classes and Objects
The Deal with Objects
A Touch of Class
Scrupulous Methods
Desirable Properties
Matters of Scope
Creating Objects from Classes
Example 1: Shuffling with Class
Construction and Destruction
Using Property Procedures
Using Structures
Trying Times and Exceptional Results
Example 2: Shuffling with Property Procedures
Form1.vb
Deck.vb
Key Points
CHAPTER 8: Using Classes, Modules, and Forms
Using .NET Framework Classes
Finding .NET Methods and Classes
Referencing Namespaces
Importing Namespaces
Making the Most of Objects and Classes
Inheritance (and Not from Uncle Otto)
Overloading and Polymorphism
Events (i.e., Getting a Raise)
Using Forms
Using Modules
Example: Dealing Cards
Creating the Main Form
Displaying the Player Forms
Moving the Player Forms
Declaring a Deck of Cards
Dealing the Cards
Ending the Game
Playing a Card
Key Points
CHAPTER 9: Designing and Using Windows Forms
Designing User Interfaces
Setting Form and Control Properties
Using Message Boxes
Finding and Creating Icons
Example: Creating a Picture Viewer
Creating the Picture Viewer Form
Creating the Picture Viewer Icons
Configuring the Form and Toolbar Icons
Specifying Assembly Information
Responding to File Exit and Help About Events
Displaying a Picture File
Copying a Picture to the Clipboard
Displaying a Picture from the Clipboard
Making the Toolbar Buttons Work
Key Points
CHAPTER 10: Interacting with Windows Form Controls
Form Control Categories
Adding and Arranging Form Controls
Working with Control Properties
Achieving Positions of Control
Oohs, Ahs, and Size
Amazing Disappearing Form Control Tricks
Tabs, Tab Orders, and TabIndex (But No Tab Dancing)
Working With Text Boxes, Check Boxes, and Radio Buttons
Working with List Boxes
Coping with Single-Selection List Boxes
Coping with Multiple-Selection ListBoxes
Adding and Removing ListBox Entries From Code
Responding to Windows Form Control Events
Staging Keyboard Events
Snapshotting Focus Events
Listening for Click Events
Reacting to Mouse Events
Example: Reporting Crocodiles
Creating the Crocodile Form
Validating the Input Fields
Writing the Output Record
Key Points
CHAPTER 11: Accessing Databases
SQL Concepts and Syntax
Retrieving Data with the SELECT Statement
Coding the SELECT Clause
Coding the FROM Clause
Coding the WHERE Clause
Coding the GROUP BY Clause
Coding the HAVING Clause
Coding the ORDER BY Clause
Adding Data with the INSERT Statement
Changing Data with the UPDATE Statement
Removing Data with the DELETE Statement
Introducing ADO.NET
Opening and Closing ADO.NET Connections
Using Command Objects
Using Data Readers
Using the DataAdapter, DataSet, and DataTable Objects
Displaying and Updating a Database
Key Points
CHAPTER 12: Programming Web Forms
Introducing the Web
Creating Web Projects
Examining a New ASP.NET Web Application
Designing Web Forms
The Life Cycle of an ASP.NET Page
Adding Controls to a Web Form
Using HTML Server Controls
Using Web Server Controls
Responding to Web Form Events
Exchanging Data with the Web Visitor
Testing Your Web Project
Example: Date Evaluator
Creating a Visual Web Page Design
Add the Code Behind the Date Evaluator Web Page
Key Points
INDEX
|