1. Building Projects Using Visual Basic Express
Preview 1-1
Requirements for Home Projects With Visual Basic Express 1-2
Introducing Visual Basic Express 1-3
Structure of a Visual Basic Express Project 1-6
Steps in Developing a Visual Basic Express Project 1-8
Starting Visual Basic Express 1-9
Visual Basic Express Integrated Development Environment (IDE) 1-10
Drawing the User Interface 1-17
Setting Properties of Controls at Design Time 1-20
Setting Properties at Run Time 1-25
How Names are Used in Control Events 1-26
Use of the Form Name Property 1-27
Writing Code 1-29
Saving a Visual Basic Express Project 1-34
Running a Visual Basic Express Project 1-35
Chapter Review 1-37
2. Overview of Visual Basic Express Programming
Review and Preview 2-1
A Brief History of BASIC 2-2
Variables 2-3
Visual Basic Express Data Types 2-4
Variable Declaration 2-5
Arrays 2-8
Constants 2-9
Variable Initialization 2-10
Intellisense Feature 2-11
Visual Basic Express Statements and Expressions 2-12
Type Checking 2-14
Visual Basic Express Arithmetic Operators 2-15
Comparison and Logical Operators 2-17
Concatenation Operators 2-19
Visual Basic Express Functions 2-20
String Functions 2-21
Dates and Times 2-22
Random Number Object 2-25
Math Functions 2-26
Visual Basic Express Decisions – If Statements 2-28
Select Case – Another Way to Branch 2-31
Visual Basic Express Looping 2-33
Visual Basic Express Counting 2-37
Chapter Review 2-39
3. Debugging a Visual Basic Express Project
Review and Preview 3-1
Errors in Visual Basic Express Projects 3-2
Debugging Visual Basic Express Projects 3-3
Opening a Visual Basic Express Project 3-5
Debugging Example 3-7
Using the Debugging Tools 3-9
Writing to the Immediate Window 3-10
Breakpoints 3-12
Viewing Variables in the Locals Window 3-15
Viewing Variables in the Watch Window 3-17
Call Stack Window 3-18
Single Stepping (Step Into) an Application 3-19
Procedure Stepping (Step Over) 3-21
Procedure Exit (Step Out) 3-22
Debugging Strategies 3-23
Chapter Review 3-24
4. Dual-Mode Stopwatch Project
Review and Preview 4-1
Project Design Considerations 4-2
Dual-Mode Stopwatch Project Preview 4-3
Form Object 4-7
Button Control 4-10
Label Control 4-12
Timer Control 4-14
Stopwatch Form Design 4-16
Code Design – Initial to Running State 4-20
Code Design – Timer Control 4-22
Using General Functions in Projects 4-24
Code Design – Update Display 4-27
Code Design – Running to Stopped State 4-29
Code Design – Stopped State 4-31
Dual-Mode Stopwatch Project Review 4-34
Dual-Mode Stopwatch Project Enhancements 4-35
5. Consumer Loan Assistant Project
Review and Preview 5-1
Consumer Loan Assistant Project Preview 5-2
Text Box Control 5-7
Loan Assistant Form Design 5-10
Code Design – Switching Modes 5-15
Form Design – Tab Order and Focus 5-19
Code Design – Computing Monthly Payment 5-23
Code Design – Computing Number of Payments 5-27
Code Design – Loan Analysis 5-31
Code Design – New Loan Analysis 5-37
Improving a Visual Basic Express Project 5-38
Code Design – Zero Interest 5-39
Key Trapping 5-41
Code Design – Key Trapping 5-44
Message Box Dialog 5-48
Code Design – Input Validation 5-53
Consumer Loan Assistant Project Review 5-62
Consumer Loan Assistant Project Enhancements 5-63
6. Flash Card Math Quiz Project
Review and Preview 6-1
Flash Card Math Quiz Project Preview 6-2
CheckBox Control 6-11
RadioButton Control 6-13
GroupBox Control 6-15
ScrollBar Controls 6-18
Flash Card Math Form Design 6-21
Code Design – Start Practice 6-31
Code Design – Problem Generation 6-35
Code Design – Obtaining Answer 6-43
Handling Multiple Events in a Single Event Procedure 6-46
Code Design – Choosing Problem Type 6-48
Code Design – Timing Options 6-51
Code Design – Presenting Results 6-58
Flash Card Math Quiz Project Review 6-60
Flash Card Math Quiz Project Enhancements 6-61
7. Multiple Choice Exam Project
Review and Preview 7-1
Multiple Choice Exam Project Preview 7-2
MenuStrip Control 7-17
OpenFileDialog Control 7-24
Multiple Choice Exam Form Design 7-27
Form Design – Initialization 7-34
Code Design – Exam File Format 7-37
Code Design – Generating Exam Files 7-38
Code Design – Opening an Exam File 7-43
Code Design – Reading an Exam File 7-46
Code Design – Error Trapping and Handling 7-53
Form Design – Selecting Options 7-58
Code Design – Start Exam 7-63
Code Design – Question Generation 7-66
Code Design – Checking Multiple Choice Answers 7-71
Code Design – Checking Type In Answers 7-77
Code Design – Checking Spelling 7-83
Code Design – Presenting Results 7-89
Multiple Choice Exam Project Review 7-92
Multiple Choice Exam Project Enhancements 7-93