Making WebBrowser app work with all IE versions 
Author Message
 Making WebBrowser app work with all IE versions

How do I write a VB application that uses the WebBrowser control that will
work with different versions of IE?  The CLSID seems to change for different
versions (for instance, IE 4.0 vs. IE 5.5) which breaks VB apps that have
references to the WebBrowser control (shdocvw).

I've written a basic application that has a WebBrowser control hosted on a
form.  It was written on a box with IE 5.50.4522.1800 (the version of
shdocvw.dll is 5.50.4614).  In the auto-generated code for the form, the
following is listed:

Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"

If I run this application on a computer with an older version of IE
(5.00.3103.1000) and shdocvw.dll (5.0.3103), then the application fails
with:

"Error 429: ActiveX component can't create object"

It looks like the CLSID for the webbrowser control on that machine is
EAB223C0-30C1-11CF-A7EB-0000C05BAE0B (there's a 3 in the 6th position
instead of an A).

Is it possible to write an application that will work with any version of IE
from 4.0 up, assuming that I'm using methods and events that were available
from 4.0 on?  Making them upgrade to version of IE that I use for
development is not an option...

Thanks for any ideas!
Mike



Sat, 10 Jan 2004 05:43:44 GMT  
 Making WebBrowser app work with all IE versions
I don't know how to do this with the webbrowser control, but I think I do
know how to do this with IE instances. You may be able to make this work for
the WebBrowser control as well...

Add this code to an form with a command button:

Private Declare Function InternetExplorer Lib "shdocvw.dll" () As Object

Private Sub Command1_Click()
  Dim IE

  Set IE = CreateObject("InternetExplorer.Application")
  IE.Visible = True
  IE.Navigate "http://www.wanadoo.nl/"
End Sub

As it requires no references to shdocvw.dll, I guess it doesn't check
version either.

--
Stephan van Erp
ICQ #49819760
http://vbpoint.cjb.net/


Quote:
> How do I write a VB application that uses the WebBrowser control that will
> work with different versions of IE?  The CLSID seems to change for
different
> versions (for instance, IE 4.0 vs. IE 5.5) which breaks VB apps that have
> references to the WebBrowser control (shdocvw).

> I've written a basic application that has a WebBrowser control hosted on a
> form.  It was written on a box with IE 5.50.4522.1800 (the version of
> shdocvw.dll is 5.50.4614).  In the auto-generated code for the form, the
> following is listed:

> Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"

> If I run this application on a computer with an older version of IE
> (5.00.3103.1000) and shdocvw.dll (5.0.3103), then the application fails
> with:

> "Error 429: ActiveX component can't create object"

> It looks like the CLSID for the webbrowser control on that machine is
> EAB223C0-30C1-11CF-A7EB-0000C05BAE0B (there's a 3 in the 6th position
> instead of an A).

> Is it possible to write an application that will work with any version of
IE
> from 4.0 up, assuming that I'm using methods and events that were
available
> from 4.0 on?  Making them upgrade to version of IE that I use for
> development is not an option...

> Thanks for any ideas!
> Mike



Sat, 10 Jan 2004 16:49:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Making WebBrowser app work with all IE versions

2. Making DHTML apps work with standard IE security (medium)

3. VB6 app has memory leak after installing IE 6.0 (installation was custom made)

4. Active X controls not working in IE 5.5 but works in IE 6.0

5. WebBrowser Ctl - Does PostData work? (IE 5.5)

6. WebBrowser Ctl - Does PostData work? (IE 5.5)

7. WebBrowser Ctl - Does PostData work? (IE 5.5)

8. Reference to host app from IE WebBrowser object

9. HELP: PWS/IIS installed makes App work????

10. Inet app no longer works after installing IE 4.0

11. App won't work without IE installed?

12. Whether IE control Work with out IE?

 

 
Powered by phpBB® Forum Software