[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Can't Make WebBrowser control in VB.NET  use IE8 Standards Mode

Posted on 2011-02-20
4
Medium Priority
?
3,028 Views
Last Modified: 2012-05-11
I am working on a desktop application in VB.NET that uses a WebBrowser control on a form. The WebBrowser control is pointed at a .htm file on the local hard drive. When I open the application this file looks a total mess because it's designed for standards-compliant browsers - when I open it in IE8 it looks fine and when I switch to IE7 compatibility mode in IE8, it looks as it does in my application, so it seems my WebBrowser control is somehow forced into IE7 mode. The .htm file has a valid DOCTYPE of XHTML-strict.

Things I have tried so far to overcome the problem include:

Adding each of these to the head section of the .htm file:

<!--<meta http-equiv="X-UA-Compatible" content="IE=IE8" />-->
<!--<meta http-equiv="X-UA-Compatible" content="IE=Edge" />-->

Adding each of these to the registry:

[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 8000 (Hex: 0x1F40)

[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"vshost32.exe" = dword 8000 (Hex: 0x1F40)

[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 8888 (Hex: 0x22B8)

[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"vshost32.exe" = dword 8888 (Hex: 0x22B8)

None of the above makes any difference to the problem.
0
Comment
Question by:wwarby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 1

Author Comment

by:wwarby
ID: 34936238
I have now also tried uploading the .htm file to a web server to rule out the possibility that there is something specific about the behaviour of the WebBrowser control when using a local file. There isn't - it behaves the same when running from a web server hosted page.
0
 
LVL 1

Author Comment

by:wwarby
ID: 34936427
I have now also confirmed exactly which mode the WebBrowser control is in using JavaScript. It's Internet Explorer 8 running in Compatibility Mode with the document in IE7 Standards mode. Nothing I do seems to make the document run in IE8 Standards mode.
0
 
LVL 13

Accepted Solution

by:
F Igor earned 2000 total points
ID: 34936703
It not a "server" problem. Only on the client browser (IE8)
Check if you use the correct name of your application ("MyApplication.exe") in the registry entry:

[(HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE)\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"MyApplication.exe" = dword 8000 (Hex: 0x1F40)

This is a "per program" entry (only applies to the programs that use the webbrowser control.
If it will work you should program an internal registry setting when you deploy your app to another computer...
0
 
LVL 1

Author Closing Comment

by:wwarby
ID: 34936776
Urgh. You know what the problem turned out to be? I'd forgotten I had to use the Wow6432Node registry path as I'm on a 64 bit platform. I wasn't setting the right registry key. As soon as I put it in the right place, it worked fine.

Thanks for the response anyway - it made me reconsider how I'd done the registry key which ultimately led to a solution ;)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question