Reputation: 9867
I have .NET Framework 2.0 project and AxWebBrowser control runing on Windows 7 with IE9 web browser.
When I put this code to my IE9 web browser:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9">
</head>
<body>
<script>alert(document.documentMode);</script>
</body>
</html>
I get value 9 - so it's correct. But when a put the same code to AxWebBrowser in my project, I always get value 8 and my HTML5 code doesn't work properly.
Where is the problem?
Upvotes: 2
Views: 1809
Reputation: 1
I solve the problem. The problem is that there are two FEATURE_BROWSER_EMULATION, one is "Wow6432Node", the other one without "Wow6432Node"
Upvotes: 0
Reputation: 3804
You will have to use registry to enable Internet Feature Controls and set the IE version that you would like to use.
Here is a sample registry file: (Don't forget to replace YOURPROGRAM.EXE with the name of your executable)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"YOURPROGRAM.EXE"=dword:00002328
This can also be done dynamically from code.
Of course, if IE9 is not installed on the client computer you won't be able to use HTML5, then you can consider using another webbrowser control, there are plenty of them online.
See this page for more details: http://msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation
Upvotes: 2