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
Using the Browser
When you select View | Web Browser with your generated application, your application will attempt to make an Internet connection through your ISP. Generally, this means that you'll have to log on to the Internet by issuing your username and password. For example, if you subscribe to the Internet using The Microsoft Network online service, you'll see Figure 24.4's Sign In dialog box right after you select View | Web Browser.
Figure 24.4 You must connect to your ISP.
Obviously, anyone who runs your application must also log in to her ISP, and her ISP login dialog box will appear in place of this Sign In dialog box if she uses a different ISP.
After you (or your application's user) log in to the ISP, the application displays the Web browser and the Web page you set as the default (see Figure 24.5).
Figure 24.5 Your application now contains a Web browser.
The Web browser includes the standard browsing tools that you are used to if you've ever used a browser. You can perform all the following tasks from your application's browser:
- You (or your application's user) can click the Web page's hotspots to jump to related Web pages.
- You can enter a new URL in the Address text box to see a different site.
- You can browse backward through the pages you've seen by clicking the toolbar's Back button.
- Once you back up, you can return to a Web page by clicking the toolbar's Forward button.
- If a Web page takes a long time to load its graphics, you can click the toolbar's Stop button to freeze the page at its current loaded state. (Usually the text will load long before all the graphics load and you might not need to view the rest of the page's graphics.)
- You can refresh a Web page that you've stopped from loading or refresh to see new information by clicking the toolbar's Refresh button.
- The toolbar's Home button takes you to the home page set up for your ISP (not the URL you entered in the wizard's text box). You can select View | Options | Navigation to set a different home page.
- Click the toolbar's Search button to locate other sites on the Internet.
All this is possible and you never coded one programming statement to gain the Internet functionality!
Java is a Web-based programming language similar to C++. Java adds interactivity to a Web page.
VBScript is a Web page scripting language that you can use to activate Web pages by adding intelligence to Web pages to interact with the user.
By the way, now that you've mastered Visual Basic, you know almost everything there is to know about VBScript. Therefore, you'll be able to work as a Web page programmer with just a little extra training in VBScript and HTML coding. For a great text that explains how to use VBScript, pick up a copy of either Sams Teach Yourself VBScript in 21 Days or Laura Lemay's Web Workshop: ActiveX and VBScript (both by Sams Publishing).
When you finish browsing the Web, you can close the Browser window and continue with your application. Obviously, the wizard's application is still just a shell. Nevertheless, the most functional part of the application is the Web browser, and you can see how simple Visual Basic makes it to drop a browser into an application.
Looking Through the Other Tools | Next Section

Account Sign In
View your cart