| Acknowledgments | p. xv |
| Introduction | p. xvii |
| Introduction to Visual Basic .NET | |
| What Is Visual Basic .NET? | p. 3 |
| Visual Basic .NET Defined | p. 5 |
| Visual Basic .NET Is a Programming Language | p. 5 |
| Visual Basic .NET Is Used for Writing Windows Applications | p. 8 |
| Windows Applications Are Gooey | p. 9 |
| Windows Applications Are Event-Driven | p. 11 |
| The Visual Basic .NET Programming Language Is Object-Oriented | p. 13 |
| Properties | p. 14 |
| Methods | p. 15 |
| Events | p. 15 |
| Programming with Class | p. 16 |
| It's Not Just Visual Basic, It's Visual Basic .NET | p. 17 |
| Summary | p. 19 |
| Mastery Check | p. 20 |
| Create A Visual Basic .NET Program Without Writing Code | p. 23 |
| The .NET Framework | p. 25 |
| Before You Install Visual Studio .NET | p. 26 |
| Visual Studio .NET Versions | p. 27 |
| Visual Studio .NET System Requirements | p. 27 |
| Installing Visual Studio .NET | p. 28 |
| Starting and Customizing Visual Studio .NET | p. 34 |
| Creating a Windows Application | p. 38 |
| The Code Behind the Scenes | p. 44 |
| Class and Inherits Statements | p. 46 |
| New Method | p. 47 |
| Initialize Component Method | p. 48 |
| Dispose Method | p. 50 |
| Region Directive | p. 52 |
| Summary | p. 53 |
| Mastery Check | p. 54 |
| Event Procedures, Properties, and Controls | p. 57 |
| Event Procedures | p. 58 |
| When Are Event Procedures Necessary? | p. 59 |
| Using the IDE to Create an Event Procedure | p. 61 |
| Writing Code Inside the Event Procedure | p. 64 |
| Viewing and Changing Properties | p. 70 |
| Using the Forms Designer to View and Change Properties | p. 71 |
| Viewing and Changing Properties Through Code | p. 75 |
| Adding Controls to the Form | p. 76 |
| The Toolbox | p. 76 |
| Copying the Control from the Toolbox to the Form | p. 79 |
| Changing the Control's Size and Location Using the Forms Designer | p. 80 |
| The Code Behind the Scenes | p. 81 |
| Using the Label Control | p. 82 |
| Summary | p. 85 |
| Mastery Check | p. 86 |
| Programming Building Blocks: Variables, Data Types, and Operators | |
| Variables and Data Types | p. 91 |
| Data Types | p. 92 |
| Bits and Bytes | p. 94 |
| Numeric Data Types | p. 96 |
| Character Data Types | p. 100 |
| Miscellaneous Data Types | p. 100 |
| Default Values | p. 101 |
| Variables | p. 103 |
| Option Explicit | p. 103 |
| Option Strict | p. 105 |
| Scope | p. 106 |
| Declaring a Variable | p. 108 |
| Shared Variable | p. 114 |
| Constants | p. 118 |
| Summary | p. 121 |
| Mastery Check | p. 122 |
| Assignment and Arithmetic Operators | p. 125 |
| The Assignment Operator | p. 126 |
| The Location of the Assignment Statement | p. 127 |
| The Left Side of the Assignment Statement | p. 127 |
| The Right Side of the Assignment Statement | p. 128 |
| Type Conversions | p. 130 |
| Widening Conversions | p. 130 |
| Narrowing Conversions | p. 131 |
| The Effect of Option Strict on Conversions | p. 133 |
| Type Conversion Keywords | p. 133 |
| Arithmetic Operators | p. 136 |
| The Division Operators | p. 137 |
| Concatenation Operators | p. 138 |
| Type Conversions Revisited | p. 139 |
| Operator Precedence | p. 141 |
| Combining Arithmetic and Assignment Operators | p. 142 |
| Change Machine Project | p. 143 |
| The InputBox Function and Return Value | p. 145 |
| The Algorithm | p. 147 |
| Outputting the Result | p. 148 |
| Summary | p. 149 |
| Mastery Check | p. 149 |
| Comparison and Logical Operators | p. 153 |
| Comparison Operators | p. 155 |
| Comparing Objects | p. 157 |
| Comparing Strings | p. 158 |
| Precedence | p. 162 |
| Logical Operators | p. 163 |
| The And Operator | p. 163 |
| The AndAlso Operator | p. 164 |
| The Or Operator | p. 165 |
| The OrElse Operator | p. 166 |
| The Xor Operator | p. 166 |
| The Not Operator | p. 167 |
| Precedence | p. 167 |
| Summary | p. 168 |
| Mastery Check | p. 170 |
| Controlling the Flow of the Program | |
| Control Structures | p. 175 |
| If Statements | p. 176 |
| The If...Then Statement | p. 177 |
| The If...Then...Else Statement | p. 178 |
| The IIf Function | p. 179 |
| The If...Elself Statement | p. 180 |
| Controls Used for If Statements | p. 182 |
| CheckBox Control | p. 182 |
| RadioButton Control | p. 182 |
| Tuition Calculator | p. 183 |
| The Select Case Statement | p. 190 |
| Arithmetic Calculator | p. 193 |
| Summary | p. 197 |
| Mastery Check | p. 197 |
| Loops and Arrays | p. 201 |
| Loop Structures | p. 202 |
| The For...Next Statement | p. 202 |
| The While...End While Statement | p. 206 |
| The Do Statement | p. 208 |
| Arrays | p. 211 |
| Declaring an Array | p. 212 |
| Useful Array Functions, Properties, and Methods | p. 215 |
| Resizing an Array | p. 217 |
| The For Each...Next Statement | p. 219 |
| Day of Week Calculator | p. 222 |
| Summary | p. 228 |
| Mastery Check | p. 229 |
| Procedures | p. 231 |
| Types of Procedures | p. 232 |
| Built-in vs. Programmer-defined Procedures | p. 233 |
| Methods Contrasted | p. 233 |
| Subroutines | p. 235 |
| Declaring a Subroutine | p. 235 |
| Calling the Subroutine | p. 240 |
| Arguments | p. 241 |
| Functions | p. 245 |
| Declaring Functions | p. 245 |
| Calling Functions | p. 248 |
| More on Arguments | p. 251 |
| Passing Arguments ByVal and ByRef | p. 251 |
| Optional Arguments | p. 255 |
| Parameter Arrays | p. 258 |
| Procedure Overloading | p. 261 |
| Calculator, Version 2 | p. 264 |
| Summary | p. 267 |
| Mastery Check | p. 268 |
| The User Interface | |
| Helper Forms | p. 275 |
| Message Boxes | p. 277 |
| Message Boxes | p. 278 |
| Dialog Boxes | p. 285 |
| Dialog Box | p. 285 |
| Owned Forms | p. 296 |
| Owned Form | p. 297 |
| Summary | p. 306 |
| Mastery Check | p. 308 |
| Menus and Toolbars | p. 311 |
| Menus | p. 312 |
| Creating a Menu | p. 312 |
| Add Functionality to the Menu Items | p. 318 |
| Enhancing the Menu | p. 320 |
| Disabling Items on Windows Forms Menus | p. 323 |
| Context Menu | p. 324 |
| Creating a Context Menu | p. 326 |
| Adding Items to the Context Menu | p. 328 |
| Add Functionality to the Menu Items | p. 333 |
| Toolbars | p. 335 |
| Adding the Toolbar and Buttons | p. 335 |
| Defining an Icon for a Toolbar Button | p. 339 |
| Adding Functionality to the Toolbar | p. 343 |
| Text Editor | p. 346 |
| Summary | p. 348 |
| Mastery Check | p. 349 |
| Error Handling and Prevention | |
| Structured Exception Handling and Debugging | p. 355 |
| Structured Exception Handling | p. 357 |
| Exceptions | p. 357 |
| Structured vs. Unstructured Exception Handling | p. 358 |
| The Try...Catch...Finally Statement | p. 358 |
| Illegal Division | p. 360 |
| Exception Classes | p. 362 |
| Debugging | p. 364 |
| Break Mode | p. 366 |
| Starting Debugging | p. 366 |
| Controlling the Flow During Debugging | p. 374 |
| Debugging Tools | p. 379 |
| Summary | p. 385 |
| Mastery Check | p. 387 |
| Answers to Mastery Checks | p. 389 |
| What Is Visual Basic .NET? | p. 390 |
| Create A Visual Basic .NET Program Without Writing Code | p. 391 |
| Event Procedures, Properties, and Controls | p. 392 |
| Variables and Data Type | p. 393 |
| Assignment and Arithmetic Operators | p. 393 |
| Comparison and Logical Operators | p. 394 |
| Control Structures | p. 395 |
| Loops and Arrays | p. 396 |
| Procedures | p. 397 |
| Helper Forms | p. 399 |
| Menus and Toolbars | p. 400 |
| Structured Exception Handling and Debugging | p. 401 |
| Index | p. 403 |
| Table of Contents provided by Syndetics. All Rights Reserved. |