Synopses & Reviews
Whether you are new to programming or to Visual Basic 2005, this tutorial gives you practical guidance to build your programming knowledge. Use the real-world exercises to teach yourself the essentials of Visual Basic—and begin creating applications for Microsoft Windows and the Web.
Discover how to:
- Work in the Microsoft Visual Studio 2005 development environment
- Use Toolbox controls to create compelling user interfaces complete with digital photos, menus, toolbars, check boxes, and more
- Add artwork, animation, and special effects to an application
- Use inheritance and other new object-oriented programming capabilities
- Detect, track, and repair bugs in your code
- Store program data using variables, modules, arrays, and collections
- Add sophisticated functions to your applications with Microsoft .NET Framework 2.0 classes and methods
- Manage code flow with decision structures, loops, timers, and procedures
- Program interactive Web applications with Microsoft ASP.NET 2.0
- Create datacentric applications using Microsoft ADO.NET
- Write custom code for printers and configure dialog boxes for printing
- Migrate Visual Basic 6.0 code to Visual Basic 2005
CD includes all practice exercises.
For customers who purchase an ebook version of this title, instructions for downloading the CD files can be found in the ebook.
About the Author
Michael Halvorson has written more than 30 books, including the popular Microsoft Visual Basic 2008 Step by Step, Microsoft Office XP Inside Out, and Microsoft Visual Basic 6.0 Professional Step by Step. A former Visual Basic localization manager at Microsoft, Michael is a professor at Pacific Lutheran University.
Table of Contents
Acknowledgments; Introduction; What is Visual Basic 2005?; Finding Your Best Starting Point in This Book; System Requirements; Prerelease Software; Installing and Using the Practice Files; Uninstalling the Practice Files; Conventions and Features in This Book; Helpful Support Links; Support for this Book; Part 1: Getting Started with Microsoft Visual Basic 2005; Chapter 1: Exploring the Visual Studio Integrated Development Environment; The Visual Studio Development Environment; The Visual Studio Tools; The Properties Window; Moving and Resizing the Programming Tools; Opening a Web Browser Within Visual Studio; Getting Help; Customizing IDE Settings to Match Step-by-Step Exercises; One Step Further: Exiting Visual Studio; Chapter 1 Quick Reference; Chapter 2: Writing Your First Program; Lucky Seven: Your First Visual Basic Program; Programming Steps; Creating the User Interface; Setting the Properties; Writing the Code; Running Visual Basic Applications; Building an Executable File; One Step Further: Adding to a Program; Chapter 2 Quick Reference; Chapter 3: Working with Toolbox Controls; The Basic Use of Controls: The Hello World Program; Using the DateTimePicker Control; Controls for Gathering Input; One Step Further: Using the LinkLabel Control; Chapter 3 Quick Reference; Chapter 4: Working with Menus, Toolbars, and Dialog Boxes; Adding Menus by Using the MenuStrip Control; Adding Access Keys to Menu Commands; Processing Menu Choices; Adding Toolbars with the ToolStrip Control; Using Dialog Box Controls; Event Procedures That Manage Common Dialog Boxes; One Step Further: Assigning Shortcut Keys to Menus; Chapter 4 Quick Reference; Part II: Programming Fundamentals; Chapter 5: Visual Basic Variables and Formulas, and the .NET Framework; The Anatomy of a Visual Basic Program Statement; Using Variables to Store Information; Using Variables in a Program; Using a Variable to Store Input; Using a Variable for Output; Working with Specific Data Types; Working with Visual Basic Operators; Working with Methods in the Microsoft .NET Framework; One Step Further: Establishing Order of Precedence; Chapter 5 Quick Reference; Chapter 6: Using Decision Structures; Event-Driven Programming; Using Conditional Expressions; If...Then Decision Structures; Select Case Decision Structures; One Step Further: Detecting Mouse Events; Chapter 6 Quick Reference; Chapter 7: Using Loops and Timers; Writing For...Next Loops; Writing Do Loops; The Timer Control; Using a Timer Object to Set a Time Limit; One Step Further: Inserting Code Snippets; Chapter 7 Quick Reference; Chapter 8: Debugging Visual Basic Programs; Finding and Correcting Errors; Debugging 101: Using Debugging Mode; Tracking Variables by Using a Watch Window; Visualizers: New Debugging Tools That Display Data; Using the Immediate and Command Windows; One Step Further: Removing Breakpoints; Chapter 8 Quick Reference; Chapter 9: Trapping Errors by Using Structured Error Handling; Processing Errors by Using Try...Catch; Writing a Disc Drive Error Handler; More Complex Try...Catch Error Handlers; Comparing Error Handlers with Defensive Programming Techniques; One Step Further: The Exit Try Statement; Chapter 9 Quick Reference; Chapter 10: Creating Modules and Procedures; Working with Modules; Working with Public Variables; Creating Procedures; Writing Function Procedures; Writing Sub Procedures; One Step Further: Passing Arguments by Value and by Reference; Chapter 10 Quick Reference; Chapter 11: Using Arrays to Manage Numeric and String Data; Working with Arrays of Variables; Preserving Array Contents by Using ReDim Preserve; One Step Further: Processing Large Arrays by Using Methods in the Array Class; Chapter 11 Quick Reference; Chapter 12: Working with Collections and the System.Collections Namespace; Working with Object Collections; Creating Your Own Collections; One Step Further: Visual Basic for Applications Collections; Chapter 12 Quick Reference; Chapter 13: Exploring Text Files and String Processing; Displaying Text Files by Using a Text Box Object; Using the StreamReader Class and My.Computer.FileSystem to Open Text Files; Creating a New Text File on Disk; Processing Text Strings with Program Code; One Step Further: Examining the Sort Text Program Code; Chapter 13 Quick Reference; Part III: Designing the User Interface; Chapter 14: Managing Windows Forms and Controls at Run Time; Adding New Forms to a Program; Working with Multiple Forms; Positioning Forms on the Windoooooows Desktop; Adding Controls to a Form at Run Time; Organizing Controls on a Form; One Step Further: Specifying the Startup Object; Chapter 14 Quick Reference; Chapter 15: Adding Graphics and Animation Effects; Adding Artwork by Using the System.Drawing Namespace; Adding Animation to Your Programs; Expanding and Shrinking Objects While a Program Is Running; One Step Further: Changing Form Transparency; Chapter 15 Quick Reference; Chapter 16: Inheriting Forms and Creating Base Classes; Inheriting a Form by Using the Inheritance Picker; Creating Your Own Base Classes; One Step Further: Inheriting a Base Class; Chapter 16 Quick Reference; Chapter 17: Working with Printers; Using the PrintDocument Class; Printing Multipage Text Files; One Step Further: Adding Print Preview and Page Setup Dialog Boxes; Chapter 17 Quick Reference; Part IV: Database and Web Programming; Chapter 18: Getting Started with ADO.NET; Database Programming with ADO.NET; The Data Sources Window; Using Bound Controls to Display Database Information; One Step Further: Writing SQL Statements to Filter Data; Chapter 18 Quick Reference; Chapter 19: Data Presentation Using the DataGridView Control; Using DataGridView to Display Database Records; Formatting DataGridView Cells; Datacentric Focus: Adding a Second Grid and Navigation Control; One Step Further: Updating the Original Database; Chapter 19 Quick Reference; Chapter 20: Creating Web Sites and Web Pages Using Microsoft Visual Web Developer and ASP.NET; Inside ASP.NET 2.0; Building a Web Site by Using Visual Web Developer; Using the Web Page Designer; Adding Server Controls to a Web Site; Adding Additional Web Pages and Resources to a Web Site; Displaying Database Records on a Web Page; One Step Further: Setting the Web Site Title in Internet Explorer; Chapter 20 Quick Reference; Part V: Appendix; Appendix : Where to Go for More Information; Visual Basic Web Sites; Books for Visual Basic and Visual Studio Programming; Appendix : About the Author;