Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
hey guys,

I want to make a small desktop app, for try to see a page with different versions of IE, for example, see http://www.google.com in my app, on IE7, IE8, IE9, IE10 or IE11

On my machine I have installed Internet Explorer 11.0.9600.16428.

The registries was updated when I change the "version" from my software (i did a dropdown for can choose IE7 to IE11 with the respective dword code), but when I change the dropdown, in the same place, I do an alert to WebBrowser.Version for see if changes something, but not.

I asked this because I don't know if is possible make a software for make a small browser with different versions of IE (with C# on Visual Studio 2012).

I would like something as this for not use external software/another resource.

C++
RegistryKey Regkey32 = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
RegistryKey Regkey64 = null;

if (Environment.Is64BitOperatingSystem)
{
   Regkey64 = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\\Wow6432Node\\Microsoft\\Internet Explorer\\MAIN\\FeatureControl\\FEATURE_BROWSER_EMULATION", true);
}

C#
Regkey32.SetValue(Path.GetFileName(Application.ExecutablePath), versionIE, RegistryValueKind.DWord);

if (Environment.Is64BitOperatingSystem)
{
  Regkey64.SetValue(Path.GetFileName(Application.ExecutablePath), versionIE, RegistryValueKind.DWord);
}

C#
MessageBox.Show(webBrowser1.Version.ToString())
Posted

The Browser Version will never change. It will always return the version of IE that's installed, in your case 11.

All you're doing is changing SOME of the rendering engine support used in IE11.

IT IS NOT A COMPLETEL EMULATION OF THAT VERSION OF THE BROWSER! What you're doing isn't going to work the way you expect it to. "Emulation" in IE11 is just that, emulation. It's an approximation of what it might look like on that browser. It is in no way guaranteed to be accurate!

The only way you can absolutely see for certain what your site will look like in a particular browser version is to fire up a virtual machine with that browser version installed on it and navigate to your test site.

In my humble opinion, browser modes should die a horrible death and just stop supporting older browsers. You're not really saving any time by having a single app that tries to show you how your app will render on every browser.

There is NOTHING that will do this properly!

Besides, out of the browser versions that don't support HTML5 in any way, IE8 has the highest market share at 7%, plus or minus. Versions 6 and 7 are negligable and shouldn't be tested for at all. It's up to you if you want to waste time on getting your app to work on a browser that only 7% of people use.
 
Share this answer
 
v2
hey Dave, thank you for your time!

Yes, I know is a headache this thread about different versions. But always have customers with older version of IE and we're feeling as a devil when we see that.

I have on clear that we don't have any way for do this with the WebBrowser.

Thank you again!

Best regards.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900