VB and Web Browser Advanced Interfaces (was IDocHostUIHandler in VB) 
Author Message
 VB and Web Browser Advanced Interfaces (was IDocHostUIHandler in VB)

I didn't have chance with my previous question  : no answers ! (is it due to
my poor english ? :-)
Seriously: did anybody see my previous question ?

Anyway, I try again.
Is it possible to host the web browser AX control on a VB form (or an AX
control) and have a complete control over it by implementing the MSHTML
advanced interfaces (IDocHostUIHandler, ICustomDoc, IDocHostShowUI) ?

Does anybody have already done this ? Is it possible using only VB or does
it require a C wrapper class (like WBCustomize.dll) ?

Here is what I have tried:
- I have made a typelib for IDocHostUIHandler and ICustomDoc (not very sure
of the results, I never use IDL before...).
- In VB, I have a form (which host the webbrowser control) and which
Implements IDocHostUIHandler and relatives subs.
- In WebBrowser1.DocumentComplete, I make an association between the
document and my interface :
   dim Doc as ICustomDoc
   set Doc=WebBrowser1.Document
   Doc.SetUIHandler Me

It seems to work : I can control the context menus, I can implements
"window.external" in a script and so on.
BUT :
- i get random GPF in VB
- i have to make the association each time a new document is loaded in the
browser
- some subs of the interface are never called (GetHostInfo or
GetOptionKeyPath, for example).

I think that it would be better if the association between the webbrowser
control and my interface was made only once, during the initialization, but
I don't know how to achieve this...

In MS doc, it is said that the webbrowser control will QueryInterface the
Host's client site. What does it mean in VB ?

Thanks for any help,

Daniel



Sat, 25 Aug 2001 03:00:00 GMT  
 VB and Web Browser Advanced Interfaces (was IDocHostUIHandler in VB)

Quote:

>I didn't have chance with my previous question  : no answers ! (is it due
to
>my poor english ? :-)
>Seriously: did anybody see my previous question ?

Likely, but this is quite a question.

Quote:

>Anyway, I try again.
>Is it possible to host the web browser AX control on a VB form (or an AX
>control) and have a complete control over it by implementing the MSHTML
>advanced interfaces (IDocHostUIHandler, ICustomDoc, IDocHostShowUI) ?

God only knows.

Quote:
>Does anybody have already done this ? Is it possible using only VB or does
>it require a C wrapper class (like WBCustomize.dll) ?

It would require a typelib at least.

Quote:
>Here is what I have tried:
>- I have made a typelib for IDocHostUIHandler and ICustomDoc (not very sure
>of the results, I never use IDL before...).

Okay.

Quote:
>- In VB, I have a form (which host the webbrowser control) and which
>Implements IDocHostUIHandler and relatives subs.
>- In WebBrowser1.DocumentComplete, I make an association between the
>document and my interface :
>   dim Doc as ICustomDoc
>   set Doc=WebBrowser1.Document
>   Doc.SetUIHandler Me

>It seems to work : I can control the context menus, I can implements
>"window.external" in a script and so on.
>BUT :
>- i get random GPF in VB
>- i have to make the association each time a new document is loaded in the
>browser
>- some subs of the interface are never called (GetHostInfo or
>GetOptionKeyPath, for example).

>I think that it would be better if the association between the webbrowser
>control and my interface was made only once, during the initialization, but
>I don't know how to achieve this...

>In MS doc, it is said that the webbrowser control will QueryInterface the
>Host's client site. What does it mean in VB ?

No idea.  You are probably on the cutting edge with this one.

- Show quoted text -

Quote:

>Thanks for any help,

>Daniel



Fri, 31 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ActiveX interface magic requested (advanced ActiveX/VB/MFC question)

2. IDocHostUIHandler in VB ?

3. Internet DB applications with VB(Not ASP or browser interfaces)

4. Web Browser Interfacing

5. Web Browser Interfacing

6. Web Browser: Opening link in new Web Browser window

7. How to make my web browser as a default web browser

8. VB client or web-based interface for Database

9. web browser control in Vb.Net

10. Host VB.NET Windows app in web browser?

11. VB.net web forms for multiple browser types.

12. Print Contents of the Web Browser Control From VB.NET

 

 
Powered by phpBB® Forum Software