Internet Application

Darwin
07-24-2002, 09:58 AM
Hi there,

I'm developping a web based application that works with IE6.
I built it with VB6 as an ActiveX Document.

Then I used the Wizard Assistant to create the package.

While editing the HTML file created, I saw a comment written by the Wizard that indicates that the code written in only worked with IE 3.x (just have a look at it)

<HTML>
<HEAD>
<TITLE>MyApplication.CAB</TITLE>
</HEAD>
<BODY>

<a href=MyApplication_Document.VBD>MyApplication_Document.VBD</a>
<!--*********** Comment Begin **********
Internet Explorer Version 3.x HTML
-->
<!--*********** Comment Begin **********
<HTML>
<OBJECT ID="CC_Document"
CLASSID="CLSID:"
CODEBASE="MyApplication.CAB#version=1,0,0,0">
</OBJECT>

<SCRIPT LANGUAGE="VBScript">
Sub Window_OnLoad
Document.Open
Document.Write "<FRAMESET>"
Document.Write "<FRAME SRC=""MyApplication_Document.VBD"">"
Document.Write "</FRAMESET>"
Document.Close
End Sub
</SCRIPT>
</HTML>
*********** Comment End ********** -->

</BODY>
</HTML>


So I find a link that launch my application... but I want it to be launched directly ! :D

Is there someone who could tell me what's the code I'm looking for ? :rolleyes:

Thanks a lot for your help.

ChiefRedBull
07-24-2002, 10:25 AM
I'm not sure I understand what you mean - you want your document to open in the browser automatically as soon as the page loads, and not after a user clicks on it correct?

What does the IE3.x bit have to do with that?

Darwin
07-24-2002, 10:30 AM
Yes,

I want my document to open in the browser automatically as soon as the page loads...

The generated code in comment (see original message) only works with IE3.x but not with other versions !

So I want the code that open my document automatically with IE6..

I think it's more understandable right now, isn't it ?

ChiefRedBull
07-24-2002, 11:59 AM
Yes it is :)

Well, I've never made VBDs, but i have made a few OCXs, and these are embedded as such:

<OBJECT
CLASSID="CLSID:[long clsid here]"
CODEBASE="MyApplication.CAB#version=1,0,0,0">
</OBJECT>

It is up to you to place the CLSID in the object tag, and this should load up the VBD when the page loads...

To find out the CLSID - open your VBD project, then run it. It should appear in a webpage yes? Now view the source of that page, and copy the <object> tag out.

Darwin
07-25-2002, 02:30 AM
Thanks ChiefRedBull, but...

I've had a talk with a man from Microsoft Support that gave me informations about VBDs.

This way for developping web based interfaces was originally very intersting because of its easyness, however, its sounded to have some deployment problems. Here is one technical note from the Microsoft KB :
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q167380

Furthermore, this kind of project (ActiveX Documents) have been removed from the .NET possibilities, he told me.

So, I turned back to an OCX developpement, and encountered a problem in which you could maybe help me :

Is it possible to use browser's method ( such as .close() ) ?

Because it was easy with a VBD, and seems much more difficult with an OCX. I heard talking about Browser Helper Object, but I feel it hard to interface.

Thanks in advance

ChiefRedBull
07-25-2002, 05:55 AM
BHOs are very different to OCXs.. they are class based object oriented things which integrate with the actual browser as plugins rather than within the webpage. They are also a lot harder to write.

I don't think the OCX can invoke browser methods itself, but it is possible to work around it. Your OCX can raise events to the page, which can then react accordingly - give your OCX a "Quit" event, and then add VBS code for it in the HTML page to close the window.

Darwin
07-25-2002, 07:16 AM
All right, that's what I thought I would do (and it works yet).

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum