| |
| |
Acknowledgments | |
| |
| |
Introduction | |
| |
| |
| |
Where Do I Begin? | |
| |
| |
Where Do We Begin? | |
| |
| |
Programming the Easy Way | |
| |
| |
Planning a Program Is Like Planning to Build a House | |
| |
| |
We Receive a Call from the China Shop | |
| |
| |
We Meet with Our Client | |
| |
| |
The Systems Development Life Cycle (SDLC) | |
| |
| |
| |
The Preliminary Investigation | |
| |
| |
| |
Analysis | |
| |
| |
| |
Design | |
| |
| |
| |
Development | |
| |
| |
| |
Implementation | |
| |
| |
| |
Audit and Maintenance | |
| |
| |
Where to from Here? | |
| |
| |
Summary | |
| |
| |
| |
What Is a Computer Program? | |
| |
| |
What Is a Computer? | |
| |
| |
Data | |
| |
| |
Memory | |
| |
| |
Computer Storage | |
| |
| |
RAM versus Storage | |
| |
| |
What Makes a Computer Program Run? | |
| |
| |
A Little Computer History | |
| |
| |
DOS | |
| |
| |
Microsoft Windows | |
| |
| |
A More In-depth Look at Windows | |
| |
| |
Virtual Memory | |
| |
| |
Multitasking | |
| |
| |
Running Programs in Windows | |
| |
| |
The Windows Handle | |
| |
| |
Windows Messages | |
| |
| |
The Focus | |
| |
| |
What Is a Computer Program? | |
| |
| |
Summary | |
| |
| |
| |
Getting Comfortable with Visual Basic | |
| |
| |
The Visual Basic Environment | |
| |
| |
Preparing the Way for Programming | |
| |
| |
Let's Start Up Visual Basic! | |
| |
| |
The Visual Basic Project | |
| |
| |
The IDE | |
| |
| |
The Modes of Visual Basic | |
| |
| |
The Visual Basic Menu Bar | |
| |
| |
The Visual Basic Toolbar | |
| |
| |
The Visual Basic Toolbox | |
| |
| |
The Properties Window | |
| |
| |
Summary | |
| |
| |
| |
Programming Is Easy | |
| |
| |
Less Is Best | |
| |
| |
Visual Basic Properties, Methods, and Events | |
| |
| |
Visual Basic Properties | |
| |
| |
Running the China Shop Project for the First Time | |
| |
| |
Properties of the Form | |
| |
| |
Visual Basic Methods | |
| |
| |
Visual Basic Events | |
| |
| |
Summary | |
| |
| |
| |
Building the User Interface | |
| |
| |
Completing the User Interface | |
| |
| |
John Smiley's Ten-Step Guide to Successful Interface Development | |
| |
| |
The Visual Basic Toolbox | |
| |
| |
The China Shop Controls | |
| |
| |
Creation of the China Shop Form | |
| |
| |
Let's Run the China Shop Project! | |
| |
| |
Common Properties of the Controls in the China Shop Project | |
| |
| |
CheckBox Properties | |
| |
| |
Button Control Properties | |
| |
| |
ColorDialog Properties | |
| |
| |
GroupBox Properties | |
| |
| |
PictureBox Control Properties | |
| |
| |
Label Properties | |
| |
| |
ListBox Properties | |
| |
| |
RadioButton Properties | |
| |
| |
Timer Properties | |
| |
| |
Tab Order and the TabIndex Property | |
| |
| |
A Surprise Visit | |
| |
| |
Summary | |
| |
| |
| |
A First Look at Coding | |
| |
| |
Events and Event-Driven Programming | |
| |
| |
In the Old Days... | |
| |
| |
The Modern Approach | |
| |
| |
What's an Event? | |
| |
| |
Writing Code | |
| |
| |
Program Comments | |
| |
| |
The Line Continuation Character (_) | |
| |
| |
A Visual Basic Code Overview | |
| |
| |
The Visual Basic Debugger | |
| |
| |
The Debug Menu | |
| |
| |
Summary | |
| |
| |
| |
Data | |
| |
| |
Computer Data | |
| |
| |
Variables | |
| |
| |
How Do We Create a Variable? | |
| |
| |
Variable Declaration | |
| |
| |
Do Variables Need to Be Initialized? | |
| |
| |
Visual Basic Data Types | |
| |
| |
Numeric Data Types | |
| |
| |
The String Data Type | |
| |
| |
Other Data Types | |
| |
| |
Property Data Types | |
| |
| |
Constants | |
| |
| |
Operations on Data | |
| |
| |
Arithmetic Operations | |
| |
| |
Comparison Operators | |
| |
| |
Logical Operators | |
| |
| |
Summary | |
| |
| |
| |
Selection Structures | |
| |
| |
Falling Rock Behavior | |
| |
| |
How Can We Improve Upon This? | |
| |
| |
If...Then | |
| |
| |
If...Then...Else | |
| |
| |
If...Then...Elself | |
| |
| |
Select...Case | |
| |
| |
The China Shop Project | |
| |
| |
Reviewing the Prototype | |
| |
| |
Summary | |
| |
| |
| |
Loops | |
| |
| |
Why Loops? | |
| |
| |
The For...Next Loop | |
| |
| |
Do...Loops | |
| |
| |
Mr. Bullina Sends a Surprise | |
| |
| |
Summary | |
| |
| |
| |
String Manipulation | |
| |
| |
What Exactly Is a String? | |
| |
| |
String Concatenation | |
| |
| |
Breaking Strings Apart | |
| |
| |
Summary | |
| |
| |
| |
File Operations | |
| |
| |
Disk File Operations | |
| |
| |
Writing Data to a Disk File | |
| |
| |
Reading Data from a Disk File | |
| |
| |
Summary | |
| |
| |
| |
Finishing the User Interface | |
| |
| |
Where Are We Now? | |
| |
| |
Drop-Down Menus | |
| |
| |
A First Look at the Main Menu Control | |
| |
| |
Coding the Menu Control | |
| |
| |
More on the MsgBox Function | |
| |
| |
The Return Value of the MsgBox Function | |
| |
| |
The Button Argument of the MsgBox Function | |
| |
| |
Summary | |
| |
| |
| |
Arrays | |
| |
| |
Why Arrays? | |
| |
| |
What's an Array? | |
| |
| |
Dynamic Arrays | |
| |
| |
Array Dimensions | |
| |
| |
Modifying the China Shop Project to Include Arrays | |
| |
| |
Summary | |
| |
| |
| |
Error Handling | |
| |
| |
Common Beginner Errors | |
| |
| |
Forgetting to Increment a Counter Variable | |
| |
| |
Forgetting to Add to an Accumulator | |
| |
| |
Forgetting to Open a File | |
| |
| |
Opening a File That's Already Open | |
| |
| |
Forgetting to Close a File | |
| |
| |
Reading Beyond the End of the File | |
| |
| |
Writing to a File Opened for Input | |
| |
| |
Your Program Doesn't Find Any Records | |
| |
| |
The File You Are Reading Is Missing or Empty | |
| |
| |
Reading Too Many or Too Few Fields from a Disk File | |
| |
| |
Division by Zero | |
| |
| |
Error Handling | |
| |
| |
Unstructured Error Handling: On Error GoTo | |
| |
| |
Structured Error Handling: Try and Catch | |
| |
| |
Error Handling in the China Shop Project | |
| |
| |
Summary | |
| |
| |
| |
Customizing Your Program | |
| |
| |
Writing to the Windows Registry | |
| |
| |
GetSetting and SaveSetting | |
| |
| |
Using RegEdit | |
| |
| |
Reading from the Windows Registry | |
| |
| |
Optimizing Visual Basic Code | |
| |
| |
User-Written Procedures | |
| |
| |
Subprocedures in the China Shop Project | |
| |
| |
Testing Our Program | |
| |
| |
We Meet at the Bullina China Shop | |
| |
| |
Summary | |