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
Properties and Event Procedures
This is a good time to review properties. When the programmer (that's you!) places controls on a form, you generally set many of the control's property values at that time in the Properties window. A programmer can then write the event procedure code for the control, or she might place additional controls on the form and write event procedures later.
Many of the properties in the Properties window show up immediately during design time as you assign the properties. In other words, if you place a command button on a form and immediately click the Properties window's Caption property and type Click Here, the command button instantly reads Click Here in the Form window.
The event procedure code, however, doesn't do anything until runtime. The instructions you learn to place in the event procedures will not execute until the application's user runs the program and triggers events at runtime. The Properties window often reacts at design time, whereas the Code window often reacts at runtime. In a way, the code inside a procedure window works like a cook's recipe: the recipe describes an action that will take place once the cook begins the dish. The program describes what will happen when the program's user executes the program.
Generating an Application from Scratch | Next Section

Account Sign In
View your cart