Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loading message 1

Status
Not open for further replies.

MattNeeley

IS-IT--Management
Mar 7, 2004
94
US
I'm using an ActiveX DLL and there's a considerable load time on using it as I packed up all the possibly needed DLLs and OCXs inside of the .CAB file. After packaging I get a HTM File that I split into independant .HTML files to be pointed at each section (UserDocument) of the program. See below*. The problem being is that i cannot get it to say "Loading Please Wait..." while it's loading the ActiveX DLL and Registering itself. Any helpful tips would be very appreciated.

<HTML>
<OBJECT ID="UserDocument"
CLASSID="CLSID:<Insert Compile ID Here>"
CODEBASE="project1.cab#version=1,0,0,24">
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
Sub Window_OnLoad
Document.Open
Document.Write "<FRAMESET>"
Document.Write "<FRAME SRC=""UserDocument.vbd"">"
Document.Write "</FRAMESET>"
Document.Close
End Sub
</SCRIPT>
</HTML>
 
Matt--
I was doing the exact same thing, and I found a cool solution. The Object reference and the frame reference are only supposed to be used if you are showing the VBD or DLL to a user with IE 3.0. Since MS decomissioned it and made a "s00p3r kewl" new browser (to be read, better than IE 3.0) we have access to better JavaScript functions and better HTML versions.

I was using a UserDocument, needed to put in an HTML title on the browser and needed a "Loading..." message for a huge (5MB) CAB file.

The way I did it was to scrap the VBScript Document.write stuff and put the userdocument href in the source of an IFrame. Then put in the BODY tag of the HTML (or ASP) page the onLoad event to change the message (or delete it as I have done.) You can also pass the QueryString from the ASP call into the UserDocument with the code I have below.

Anyone with IE 5 or 6 will be able to run this code.

Code:
<HTML>
<HEAD>
  <SCRIPT>
    function changeMessage(){
      loadingMessage.innerText='';
    }
  </SCRIPT>
  <TITLE>Title of File</TITLE>
</HEAD>
<BODY bgcolor="#D6D3CE" onLoad="changeMessage()">
<div id="loadingMessage">Loading...</div>
<iframe src="UserDocument.VBD?<%=Request.QueryString%>">
Sorry, you need inline frames to view this file.
</iframe>
</BODY>
</HTML>
 
Thanks!, We couldn't figure out any way to do this well. It is very appreciated.
 
Ran into another problem. The CLS-IDs aren't in that bit of code you gave me and I have no idea where to put them as they try to download from the internet rather then run.
 
You shouldn't need them. The userdocument loads in the iframe, and it should reference the CAB file.

Be sure that you run the package and deployment wizard and select the distribution type to Internet Package. Select all the dependancy files (OCX, DLL, OLE Objects) to be included in the CAB. Make the userdocument components Safe for Scripting and Safe for Initalization.

This will compile everything into a single CAB file and associated userdocuments. Then put the first userdocument into the src of the iframe.

Also, here is a link to MSDN that helped me a lot:
Debugging, Testing, and Deploying Components

There is information there about running ActiveX components in the IDE with some assistance from Internet Explorer.

Hopefully, this helps. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top