1

In my vb6 application I have used webbrowser control in which online payment gateway website is loaded and it requires IE 8 and above. But even if IE 8 is installed the webbrowser control renders it in IE7 mode. It can be solved by using Browser emulation registry and I was able to solve it.

But now I have set value to 8888(Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive) . But if I do this even if PC has IE 9, 10 or 11 then it will be rendered in IE8 mode. But I think it will be better if the webbrowser control is rendered in highest version of IE installed in a PC, instead of fixing it to IE8 mode.

So how I can make Browser emulation to set to highest version of IE installed in PC?

IT researcher
  • 3,274
  • 17
  • 79
  • 143

2 Answers2

3

This is not easy, because there is no value for "edge" rendering. You could get IE version from registry

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\svcVersion or Version

...try both keys, newer versions IE use svcVersion, older Version. Then set the appropriate value (see msdn) in the FEATURE_BROWSER_EMULATION key.

This solution has one big disadvantage: your program must have permissions for writing in registry. It is better to do it during installation, this is the correct way (however the FEATURE_BROWSER_EMULATION value is not updated in case of upgrading IE).

Roman Plischke
  • 1,042
  • 7
  • 14
  • 2
    `HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION` basicly does the same *and* is writable for regular users. – wqw Oct 31 '14 at 17:16
  • 2
    @wqw there exists different value for each IE version for FEATURE_BROWSER_EMULATION. But i found that if i put value 11001 (value for ie 11) in a PC having IE9 it worked and my error of website loading solved. So is it allowed give IE 11 value for IE 9 pc and it works like highest possible version? – IT researcher Nov 01 '14 at 06:33
  • Well, the value 11001 could be the right way, but it is an undocumented feature. Double check all tests. - Note: In my code I had serious problems with DOM manipulation from VB6 code. For example _Document.All.Item("id1") Is Nothing_ worked well in IE7 emulation, but not higher. Test carefully your code. – Roman Plischke Nov 03 '14 at 07:35
  • For anyone interested, here's how to set the emulation version: http://stackoverflow.com/questions/4456490 – Beejor Feb 18 '16 at 02:15
0

Just put a big number like "11111111" as the value of FEATURE_BROWSER_EMULATION key. It will then take up the latest IE version installed in the system.

Aakash Uniyal
  • 1,519
  • 4
  • 17
  • 32
  • 11001 (0x2AF9 Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the declared !DOCTYPE directive. Failing to declare a !DOCTYPE directive causes the page to load in Quirks. – Soufiane Tahiri Feb 02 '19 at 14:43