beginners tutorial - Learn VB6
VB6 tutorial - Learn Advanced VB6
Analysis - System analysis and Design tutorial for Software Engineering
You are here: Visual
Basic > Advanced VB6 tutorial
> Chapter 14
Testing Your Active Document in the VB Design Environment
To test an Active Document project while still in the VB design environment,
you must run each container application that you expect to use against your Active
Document project. In VB6, you can use the Debugging tab of the Project Properties
menu to specify which container application you want to use to test your Active
The general steps for testing an Active Document project are:
STEP BY STEP
14.2 Testing an Active Document
In the Project, Options menu dialog box, choose the Debugging tab.
To automatically run an instance of your Active Document inside your Internet browser,
choose the combined default settings of the Option Button titled Start component
and the check box entitled Use existing browser, as illustrated in Figure 14.7.
FIGURE 14.7 Default settings on the Debugging tab of the Project, Options menu
If you wish to run your Active Document in another container application such as
Microsoft Office Binder, select the Start program option and choose that application’s
EXE file in the box just below the option, as illustrated in Figure 14.8.
FIGURE 14.8 Settings on the Debugging tab of the Project, Options menu dialog
to allow you to test your Active Document project with a Microsoft Office Binder container.
Run the Active Document project in design mode.
a. If you specified Start Component and Use Existing browser, then the browser you
specified (typically Internet Explorer) will appear containing an instance of your
Active Document project.
b. If you specified another container application, then open the Active Document in the container
application. Visual Basic will typically create a temporary .vbd file in the Visual
Basic program directory when it begins to run your Active Document. You should open
this .vbd file in the container (see the discussion below).
Test the document in the container application.
Beforereturning to the VB environment to make any changes, close the Active Document
in the container application and close the container application.
Return to VB and stop the ActiveX project so that you can make changes.
The details of step 5 will differ depending on the type of container you are using
to test your document project as detailed in the following points:
To open your document in Internet Explorer. On the File menu, click
Open. Then navigate to the Visual Basic program directory. Make sure that you are
viewing All File Types and then select the temporary .vbd file that VB has created.
To open your document in Office Binder (method A). On the Section
menu, click Add to display the Add Section dialog box. You’ll see a list of components
from the Windows Registry of applications that can provide Active Documents. If your
Active Document project is running, VB will have made a temporary Windows Registry entry
for it and you’ll see it in the list. Choose your project’s name from the
list to activate an Active Document based on your project.
To open your document in Office Binder (method B). On the Section
menu, click Add From File. In the resulting file dialog box, navigate to the VB program
directory and choose the temporary .vbd file.
Step 7 will also be different for different containers:
To close your document in Internet Explorer (method A). Navigate to
several other documents in order to take this document off the History list and close
it (IE keeps the documents in its History list in a memory cache; therefore these
documents don’t close until they are removed from the list). For IE 3.0 and 4.0,
you must navigate to four other documents in order to close this document because
IE keeps four documents in its History list.
To close your document in Internet Explorer (method B). Close Internet
To close your document in Office Binder. Select File, Close from
Note that future container applications may have other ways of opening or closing
an Active Document.
<< Previous | Contents
| Next >>