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
- When do you normally initialize a list box?
- What method adds new items to a list box?
- Which method determines the number of items in a list box?
- True or false: Visual Basic will automatically keep list box items sorted if you set a certain property to True.
- How many combo boxes are there?
- How do you specify the type of combo box you want to add to an application?
- True or false: The drop-down list box is one of the Combo Box controls, so users can enter new values in the drop-down list box just as they can other Combo Box controls.
- What is an array?
- What is the highest subscript in a 10-element array if you don't use Option Base 1 and you use element 0?
- True or false: A control array exists when two or more controls have the same Name property.
Exercises
- Write an application that builds a list as the user enters new values. (Hint: Use a Combo Box control for the list.) The list should hold the user's favorite book titles. As the user enters more and more titles, the list should grow. Add a command button to the form with the caption Add To; when the user clicks the command button, the title just entered goes to the list. Keep the list sorted at all times.
- Write an application that contains four command buttons. The command buttons should be blue and have boldfaced, italicized captions that read Change Color, Change Bold, Change Height, and Change Width. When the user clicks one of the command buttons, the appropriate property should change inside the Click() event procedure. Use a Select Case statement to determine which property should change based on the event procedure's Index argument.
Hour 11.Additional Controls | Next Section

Account Sign In
View your cart