Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 14

Using Your Active Document on a Web Page

You can tell the Package and Deployment Wizard to create an Internet download setup for your ActiveX project. The wizard will then create a sample HTML file that shows how to include your Active Document project in HTML script (see Listing 14.12).

LISTING 14.12
PACKAGE AND DEPLOYMENT WIZARD WILL CREATE A SAMPLE HTML FILE FOR YOUR ACTIVE DOCUMENT

<HTML>
<HEAD>
<TITLE>Project1.CAB</TITLE>
</HEAD>
<BODY>
<a href=UserDocument1.VBD>UserDocument1.VBD</a>

<!--*********** Comment Begin **********
Internet Explorer Version 3.x HTML
====================================
The following HTML code has been commented
out and provided for ActiveX User Documents
download support in IE 3.x only. This
HTML script may not work properly in later
versions of Internet Explorer.
Additional information about downloading
ActiveX User Documents in IE 3.x can be
found in Microsoft’s online support on the
internet at http://support.microsoft.com.
*********** Comment End ********** —>

<!--*********** Comment Begin **********
<HTML>
<OBJECT ID="UserDocument1"
CLASSID="CLSID:"
CODEBASE="Project1.CAB#version=1,0,0,0">
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
Sub Window_OnLoad
Document.Open
Document.Write "<FRAMESET>"
Document.Write "<FRAME SRC=""UserDocument1.VBD"">"
Document.Write "</FRAMESET>"
Document.Close
End Sub
</SCRIPT>
</HTML>
*********** Comment End ********** —>

</BODY>
</HTML>

The <OBJECT ... </OBJECT> tag that you see in the HTML script has the same function as the <OBJECT ... </OBJECT> tag for an ActiveX control (see Chapter 12 for details).

Notice the VBScript code in the second half of the sample listing. This code essentially tells the HTML script to load your document into the Window Frame of the browser.


  

<< Previous | Contents | Next (Chapter15) >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved