Sams Teach Yourself Visual Basic 6 in 24 Hours
- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Introduction
- Who Should Read This Book
- What This Book Will Do for You
- Can This Book Really Teach Visual Basic in 24 Hours?
- What You Need
- Files on the Visual Basic Distribution CD-ROM
- Conventions Used in This Book
- Enough! Time Is Ticking!
- Part I: Introducing Visual Basic
- Hour 1. Visual Basic at Work
- Hour 2.Analyzing Visual Basic Programs
- Hour 3.Controls and Properties
- Hour 4.Examining Labels, Buttons, and Text Boxes
- Part II: Coding the Details
- Hour 5.Putting Code into Visual Basic
- Hour 6.Message and Input Boxes
- Hour 7.Making Decisions
- Hour 8.Visual Basic Looping
- Part III:Putting Code to Work
- Hour 9.Combining Code and Controls
- Hour 10.List Boxes and Data Lists
- Hour 11.Additional Controls
- Hour 12.Dialog Box Basics
- Part IV:Programming with Data
- Hour 13.Modular Programming
- Hour 14.Built-In Functions Save Time
- Hour 15.Visual Basic Database Basics
- Hour 16.Printing with Visual Basic
- Part V:Sprucing Up Programs
- Hour 17.Menus and Visual Basic
- Hour 18.The Graphic Image Controls
- Hour 19.Toolbars and More Graphics
- Hour 20.Writing Correct Applications
- Part VI:Advancing Visual Basic Applications
- Hour 21.Visual Basic and ActiveX
- Hour 22.Object Basics
- Hour 23.Distributing Your Applications
- Hour 24.Online Visual Basic
- Part VII:Appendixes
- Appendix A.Operator Precedence
- Appendix B.Answers
- Appendix C.Using the CD-ROM
Workshop
The quiz questions and exercises are provided for your further understanding. See Appendix B for the answers.
Quiz
- Which errors are the easiest to find?
- Which errors are the hardest to find?
- If you write a program and, during execution, the program halts and displays an error message telling you that a disk drive doesn't exist, what kind of error just occurred?
- How can you tell the current program mode?
- What is a breakpoint?
- What are three things you can do at a breakpoint?
- How do you single-step through a program?
- True or false: While using the debugger, you have no access to your program's Output window.
- What's the quickest way to see a variable's value at a breakpoint?
- What method displays values in the Immediate window?
Exercises
-
Larry the Visual Basic programmer wants to send values to the Immediate window right before he reads a disk file. Here are some statements Larry uses to print to the Immediate window:
Print lblFileName.Caption Print intNumRecs, intNumFields Print strCompName
Larry isn't having success. Instead of the Immediate window, these values all seem to appear on the form itself! Help determine what Larry is doing wrong so he can view the values in the Immediate window.
-
Load the Controls.vbp sample project. Single-step through the project beginning at a breakpoint that you set in Form_Load()'s last statement. The program uses data in a different way than normal because the program uses a resource file to hold its strings. By moving all its data out to a resource file, the strings can be easily translated to other languages, and the program only needs to be recompiled. Without a resource file, a programmer would have to search the Code window for all strings and possibly miss some. Use the single-step mode to learn how the resource file and its related built-in functions operate.
Part VI:Advancing Visual Basic Applications | Next Section

Account Sign In
View your cart