|
|
![]() | |
|
|
|
To access the contents, click the chapter and section titles.
Visual Basic 6 Black Book
This completes our overview of the standard parts of a standard Visual Basic project. Weve 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 well take a look at that now. Using The Visual Basic Application WizardThe 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 well 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.
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 well leave it selected. Click the Next button to move to the next screen.
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.
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.
The next screen asks about database connectivity; click Next to open the last Application Wizard screen, shown in Figure 1.14.
Click Finish in the last Application Wizard screen now to create the project, and run that project, as shown in Figure 1.15.
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 menus Open, Save, and Save As items to open and display files. Theres a lot of power here, and well see how to do all these things ourselves in this book. Its instructive to take a look at the project file for this project, where we see that this project makes use of these ActiveX controls:
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"
...
|
|
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. |