Table of Contents
Introduction 1
PART I: The Visual Basic 2012 Environment
HOUR 1: Jumping in with Both Feet: A Visual Basic 2012 Programming Tour 5
Starting Visual Basic 2012 . . . . . . . . . 6
Creating a New Project . . . . . . . . . . 7
Understanding the Visual Studio 2012 Environment . . . . . 10
Changing the Characteristics of Objects . . . . . . . 11
Adding Controls to a Form. . . . . . . . . 16
Designing an Interface . . . . . . . . . 17
Writing the Code Behind an Interface . . . . . . . 21
Running a Project . . . . . . . . . . 25
HOUR 2: Navigating Visual Basic 2012 29
Using the Visual Basic 2012 Start Page . . . . . . . 30
Navigating and Customizing the Visual Basic Environment. . . 32
Working with Toolbars. . . . . . . . . . 37
Adding Controls to a Form Using the Toolbox . . . . . . 38
Setting Object Properties Using the Properties Window . . . . 39
Managing Projects . . . . . . . . . . 45
A Quick-and-Dirty Programming Primer . . . . . . 51
Getting Help . . . . . . . . . . . 53
HOUR 3: Understanding Objects and Collections 57
Understanding Objects. . . . . . . . . . 58
Understanding Properties . . . . . . . . . 58
Understanding Methods. . . . . . . . . 65
Building a Simple Object Example Project. . . . . . 67
Understanding Collections . . . . . . . . . 72
Using the Object Browser . . . . . . . . . 75
HOUR 4: Understanding Events 79
Understanding Event-Driven Programming . . . . . . 79
Building an Event Example Project . . . . . . . 87
Keeping Event Names Current . . . . . . . . 92
PART II: Building a User Interface
HOUR 5: Building Forms: The Basics 95
Changing a Form’s Name . . . . . . . . . 96
Changing a Form’s Appearance . . . . . . . . 97
Showing and Hiding Forms. . . . . . . . . 107
HOUR 6: Building Forms: Advanced Techniques 117
Working with Controls . . . . . . . . . 117
Creating Topmost Nonmodal Windows. . . . . . . 134
Creating Transparent Forms . . . . . . . . 135
Creating Scrollable Forms. . . . . . . . . 135
Creating MDI Forms . . . . . . . . . . 137
Setting the Startup Form. . . . . . . . . 140
HOUR 7: Working with Traditional Controls 145