PRB: Launching VB5 ActiveX Documents from Internet ExplorerID: Q168431
|
When browsing to an ActiveX Document using Microsoft Internet Explorer, the
document will fail to load the associated VBD file correctly. Instead,
Microsoft Internet Explorer will display the following message:
"Opening:
<filename> from <URL>
Some files can contain viruses or otherwise be harmful to your
computer. It is important to be certain that this file is from a
trustworthy source.
What would you like to do with this file?"
The Setup Wizard for Microsoft Visual Basic 5.0 creates a set of files to
be used for Internet download of ActiveX Documents. These files include a
cabinet (CAB), VBD, and a hypertext-markup HTM file.
Unfortunately, without changes to the HTM file, an ActiveX Document will
not launch correctly when a user browses to the HTM file using Microsoft
Internet Explorer 3.x.
Below is a sample of an original HTM file created using the Microsoft
Visual Basic 5.0 Setup Wizard. Following the example, is another sample
that shows a working HTM file.
<HTML>
<OBJECT ID="SampleDoc1"
CLASSID="CLSID:11111111-1111-1111-1111-111111111111"
CODEBASE="Project1.CAB#version=1,0,0,0">
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
Sub Window_OnLoad
Document.Open
Document.Write "<FRAMESET>"
Document.Write "<FRAME SRC=""SampleDoc1.VBD"">"
Document.Write "</FRAMESET>"
Document.Close
End Sub
</SCRIPT>
</HTML>
<HTML>
<OBJECT ID="SampleDoc1"
CLASSID="CLSID:11111111-1111-1111-1111-111111111111"
CODEBASE="Project1.CAB#version=1,0,0,0">
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
Sub Window_OnLoad
Location.Replace("SampleDoc1.vbd")
End Sub
</SCRIPT>
</HTML>
Sub Window_OnLoad
Location.Replace("FILENAME.vbd")
End Sub
where "FILENAME.VBD" must be replaced with the name of your VBD
(including quotation marks).
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
Keywords : kbtool kbVBp500 AXSDKCompDownload AXSDKDocObjects
Version : 5.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 12, 1999