Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Visual Basic 6 Black Book
(Publisher: The Coriolis Group)
Author(s): Steven Holzner
ISBN: 1576102831
Publication Date: 08/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


This completes our overview of the standard parts of a standard Visual Basic project. We’ve seen how simple projects work in Visual Basic now. Besides this simple kind of project, you can design quite advanced projects using a tool like the Visual Basic Application Wizard, and we’ll take a look at that now.

Using The Visual Basic Application Wizard

The Visual Basic Application Wizard is a Visual Basic add-in that lets you use some advanced project features when you first create a project. The Application Wizard is usually used by beginning programmers, but we’ll take a look at it here to get an idea of what more involved projects can look like.

You start the Application Wizard from the New Project box, opened either from the New item in the File menu or when Visual Basic first starts. The Application Wizard appears in Figure 1.10.


Figure 1.10  The Visual Basic Application Wizard.


TIP:  In Figure 1.10, the Application Wizard is asking for a profile. You can save Application Wizard profiles (something like project templates) in the last step of the Application Wizard, which lets you save all the options you’ve specified. Loading them in later can save you some time if you just want to alter a few settings.

Click the Next button in the Application Wizard now, opening the next screen, shown in Figure 1.11. The Multiple Document Interface (MDI) option is already selected, and we’ll leave it selected. Click the Next button to move to the next screen.


Figure 1.11  Selecting MDI support in the Visual Basic Application Wizard.

The next screen lets you select menu options, the next screen toolbar options, and the one after that resource options. Keep clicking Next to accept all the defaults. The Internet Connectivity screen, which opens next, lets you add a Web browser window to your project if you like. This can be very useful, so click Yes as shown in Figure 1.12, then click Next again to move on.


Figure 1.12  Adding a Web browser with the Visual Basic Application Wizard.

The next step in the Application Wizard, as shown in Figure 1.13, lets you add a splash screen. A splash screen comes up while the program is loading and can give the impression that something is really happening while the program is loaded. We add a splash screen to our program by selecting the Splash Screen At Application Start Up option.


Figure 1.13  Adding a splash screen with the Visual Basic Application Wizard.


TIP:  Originally, splash screens were very popular—in fact, virtually every piece of Microsoft software has one these days—but users are catching on that they are just razzle-dazzle.

The next screen asks about database connectivity; click Next to open the last Application Wizard screen, shown in Figure 1.14.


Figure 1.14  Finishing a Visual Basic Application Wizard project.

Click Finish in the last Application Wizard screen now to create the project, and run that project, as shown in Figure 1.15.


Figure 1.15  Running our Visual Basic Application Wizard program.

This new program has a great deal of programming power. As you can see in Figure 1.15, this program is an MDI program, capable of opening multiple documents and even displaying a Web browser in a window. In fact, you can even use the File menu’s Open, Save, and Save As items to open and display files.

There’s a lot of power here, and we’ll see how to do all these things ourselves in this book. It’s instructive to take a look at the project file for this project, where we see that this project makes use of these ActiveX controls:

  Common dialogs (COMDLG32.OCX)
  Common windows controls (COMCTL32.OCX)
  Rich text control (RICHTX32.OCX)
  Web browser DLL (SHDOCVW.DLL)

Here is the code snippet:

Type=Exe
Reference=*\G{00020430-0000-0000-C000-_
    000000000046}#2.0#0#..\..\WINDOWS\SYSTEM\STDOLE2.TLB#OLE Automation
Module=Module1; Module1.bas
Form=frmMain.frm
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
Object={6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0; COMCTL32.OCX
Form=frmSplash.frm
Object={3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0; RICHTX32.OCX
Form=frmDocument.frm
Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; SHDOCVW.DLL
Form=frmBrowser.frm
Startup="Sub Main"
...


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.