1

i have an application with a webbrowsercontrol. this webbrowsercontrol is going to load a page that is not compatible with IE9. (cannot change this because its produced by somebody else) By default VB.NET 2010's webbrowser control uses IE9 renderengine, and can run in some sort of compatibility mode. unfortunately even in compatibility mode the page do not work. is there are way to use a webbrowser control with a genuine IE7 or IE8 render engine? thanks

UPDATE

explaining the problem: i have a page with a JAVA applet inside. this java applet has a popup opening with a textbox. this textbox is forced to stay in front until closed. this works fine in IE7 and IE8. in IE9 however if i move the browser window or access any other application this messagebox jumps to the back. and cant be clicked anymore. my webbrowser (IE9 running any emulation) does not work. it beheaves as if it still would be on IE9 even if i emulate IE7 or IE8.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
sharkyenergy
  • 3,842
  • 10
  • 46
  • 97
  • I have seen a friend of mine, tweak his registry to get the web browser control to use IE7. This is not an answer, but thought it would be an helpful direction for you to find out. – Ron Mar 14 '13 at 14:45
  • 1
    Take a look at point number 2 of this answer to point you in the right direction: http://stackoverflow.com/a/9245591/2128831 – Alistair Findlay Mar 14 '13 at 14:47
  • thanks guys.. but both answers point to the emulation. and unfortunately this does not work. updating the main post to explainw hat the compatibility problem is. – sharkyenergy Mar 14 '13 at 15:01

1 Answers1

3

is there are way to use a webbrowser control with a genuine IE7 or IE8 render engine?

Yes, but it requires that you downgrade the version of Internet Explorer that is installed on the computer to version 7 or 8, which doesn't make for a friendly installation experience.

The issue is that the WebBrowser control always uses the version of IE that is installed on the computer because it simply delegates rendering to the native library shdocvw.dll, the same one that is used by IE itself. In your case, that appears to be IE 9. However, by default, it also runs in IE 7 compatibility mode. You can change this by editing the registry, but you cannot change the version of the rendering engine.

And unfortunately, this means you're out of luck, because running multiple versions of IE on a single computer is not and has never been a supported configuration. It can be accomplished for testing purposes, but it requires additional software and the versions don't play nicely together. Certainly not nicely enough for one to support the standalone IE browser while the other drives the .NET WebBrowser control.

Fixing the code to work properly with IE 9 is the best option. IE 9 represents Microsoft's slow progression towards a standards-compliant browser, and although it still has some quirks, it is worth supporting. I know you said that the website code is maintained by "someone else", but I recommend filing a support request with them—their code is buggy and needs to be fixed. If you (or they) need help with this, they can ask some of our code ninjas web standards experts here on Stack Overflow.

Alternatively, you could explore replacing the WebBrowser control with an alternative control. There are several good ones for the .NET Framework, wrapping the rendering engines used by other popular browsers. For example:

  • WebKit .NET is a wrapper for the WebKit engine, used by Google Chrome and Apple Safari.
  • GeckoFX is a wrapper for the Gecko rendering engine, used by Mozilla Firefox.
  • MozNet is an alternative wrapper for Gecko.

Unfortunately, if the code you're dealing with is so badly written that IE 9's feeble attempt at standards-compliance brings it to its knees, it's unlikely that switching to the rendering engine for another even more standards-compliant browser will bring much success.

Community
  • 1
  • 1
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574