.Net/Winform
C# WebBrowser IE 버젼 변경
동구밖과수원
2013. 9. 6. 10:03
제 PC의 IE 버젼은 9입니다.
개발시에 WebBrowser 컨트롤이 Default로 현재 PC에 설치되어있는 IE를 따라갈줄 알았는데..
버젼 확인결과 7이더라구요..ㅠ.ㅠ
사용 PC에 레지스트를 수정해주어야합니다.
코드를 사용해도되고 직접 레지스트를 수정하셔도됩니다.
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION",
Application.ProductName + ".exe", 10001);
|
레지스트리 편집기(Regedit)로 이동하여서 아래의 경로로 이동합니다.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_BROWSER_EMULATION contoso.exe = (DWORD) 00009000 |
프로그램명과 데이터를 작성합니다.
데이터에 관한 설명은 MSDN에 나와있습니다. 저는 IE10으로 설정하기위해 10001로 설정하였습니다.
MSDN 바로가기
Value |
Description |
10001 (0x2711) |
Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive. |
10000 (0x02710) |
Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10. |
9999 (0x270F) |
Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive. |
9000 (0x2328) |
Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9. |
8888 (0x22B8) |
Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive. |
8000 (0x1F40) |
Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8 |
7000 (0x1B58) |
Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control. | |
