Home > Net >  How to dynamically adjust in Winform WEBBROWER control simulation by the IE version number
How to dynamically adjust in Winform WEBBROWER control simulation by the IE version number

Time:11-23

Multiple WEB system is used in the unit work, their demand for IE browser versions have different, have asked IE11, have asked IE 9, even the requirement that IE8, for ease of use, want to do a custom browser, in the browser allows the user to dynamically select the required version number,
VS system default webbrower adapt to IE7, currently only know by rewriting the registry can adjust webbrower control simulation by the ie version number, now the problem is, I don't know when the system is based on the registry information to determine webbrower control simulation by the ie version number, is a running in the user's EXE is identified or only after defines the webbrower control instance sure? Unknown,
Consult everybody:
1, can achieve the same system in different winform define different ie version number respectively?
2, the system is determined by the registry in what stages IE version number?
3, whether through before instantiating a winform form to modify the registry to realize the control of webbrower controls IE version number?
4, masters whether there are other ways?

CodePudding user response:

Through repeated tests, confirmed that modify the key value in the registry, the program after the operation, all WEBBROWSER control simulation by the program for the ie version Numbers are the same, during the program is running, no matter you to pass the regedit modify the registry for other version number keys, simulated the version number will not change, only to restart the program, the new key value to be effective, that is to say, in the same exe program, cannot change dynamic simulation by the WEBBROWSER ie version number,

Attached to the corresponding registry version number keys
'modify the registry to let webbrower adapt to different versions of IE browser compatibility mode
32 x HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Internet Explorer \ MAIN \ FeatureControl \ FEATURE_BROWSER_EMULATION
64 x HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ Microsoft \ Internet Explorer \ MAIN \ FeatureControl \ FEATURE_BROWSER_EMULATION
'standard mode refers to the browser, and! DOCTYPE control is document mode, the system default mode for IE7 documents show 7000,
'11, 11001 (0 x2edf) Internet Explorer web pages with IE11, according to the standard model has nothing to do with the DOCTYPE command
'11000 (0 x2af8) : 11, Internet Explorer contain DOCTYPE command based on standard web page displayed in ie 9 document mode
'10001 (0 x2af7) : Internet Explorer 10, to build web pages, according to the standard model has nothing to do with a DOCTYPE command,
'10000 (0 x2710) : Internet Explorer 10, contains standards-based DOCTYPE, according to the instruction page in ie 9 document mode
'9999 (0 x270f) : Internet Explorer 9, page in ie 9, according to the standard model has nothing to do with the DOCTYPE command
'9000 (0 x2328) : Internet Explorer 9, contains the DOCTYPE command based on standard web pages in ie 9 document model, according to
'8888 (0 x22b8) : page in IE8, according to the standard model has nothing to do with the DOCTYPE command
'8000 (0 x1f40) : contains DOCTYPE command based on standard web pages in IE8 document mode, according to
'7000 (0 x1b58) : contains standards-based DOCTYPE command pages in IE7 document mode display,
  • Related