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
- Follow the Wizard to the Web!
- Your Users Need an ISP
- Using the Browser
- Looking Through the Other Tools
- Summary
- Q&A
- Workshop
- Part VII:Appendixes
- Appendix A.Operator Precedence
- Appendix B.Answers
- Appendix C.Using the CD-ROM
Follow the Wizard to the Web!
As mentioned in the introduction, Visual Basic 6 makes Internet access extremely simple. Way back in Hour 2, "Analyzing Visual Basic Programs," you learned how to start the VB Application Wizard that created an application shell for you. You now know enough of the Visual Basic language to create a shell and modify the application with specific code so that the application does the work that you need.
An intranet is a is a localized version of the Internet and is sometimes used as a local area network's protocol system.
One of the wizard's dialog boxes gives you access to the Internet. Try it yourself by following these steps:
- Start a new project.
- From the New Project dialog box (shown in Figure 24.1), double-click VB Application Wizard to start the wizard.
Figure 24.1 Click here to start the wizard and add Internet support.
- Read the dialog boxes and click Next as you follow the wizard's application design. Accept all the default values on each dialog box and pause when you come to the dialog box labeled Internet Connectivity (see Figure 24.2).
A Web browser is a program that lets you display and interact with colorful Web pages on the Internet. URL (uniform resource locator) is an Internet Web site address where you can point a Web browser. URLs generally begin with http:// (which stands for Hypertext Transfer Protocol). URL addresses can also specify an FTP (File Transfer Protocol) document or even another document that resides on your computer or on another networked disk.
Figure 24.2 This wizard dialog box requests Internet support.
- Click Yes to request Internet support. In addition, enter a default URL in the text box. If you don't change the default URL, the Web browser will go to Microsoft's home page when the application's user displays the Web browser the first time. If your company has a home page, you might want to enter that home page's URL in the text box. If you want to make your users really smart, point them to Macmillan Publishing's home page at http://www.mcp.com.
- When you complete the Internet dialog box, continue clicking Next until you get to the final wizard dialog box. Click Finish to complete the wizard and watch the wizard generate your application. So far, nothing looks different from the wizard you used to create an application in Hour 2.
Close the wizard's summary dialog boxes and run the application. Figure 24.3 shows the resulting Internet-enabled application.
Figure 24.3 Where's the Internet?
Obviously, something is wrong because the application doesn't look anything like an Internet application. When you ran the wizard, you accepted a lot of dialog box default values. The wizard didn't generate an Internet application only, but rather an application that happens to contain Internet access.
Select View | Web Browser. The application will load the Web browser form and send the application to the Internet through your Internet Service Provider (ISP).
Your Users Need an ISP | Next Section

Account Sign In
View your cart