开发者

Origin of C# WebBrowser control

开发者 https://www.devze.com 2023-01-28 08:39 出处:网络
I am working on a C# application which uses an embedded WebBrowser control to display some HTML content. I want to test whether installing IE9 http://windows.microsoft.com/ie9 will effect my applicati

I am working on a C# application which uses an embedded WebBrowser control to display some HTML content. I want to test whether installing IE9 http://windows.microsoft.com/ie9 will effect my application.

The MSDN blog http://blogs.msdn.com/b/ie/archive/2008/03/18/webbrowser-control-rendering-modes-in-ie8.aspx states that the WebBrowser control defaults to IE7 rendering. However, I want to know what binary is actually being used to do the IE7 rendering.

I think the WebBrowser control could be packaged with:

  • the ver开发者_StackOverflowsion of IE included with Windows (e.g. IE8 with Windows 7)
  • the newest version of IE installed in Windows (e.g. IE9)
  • the .NET runtime, my application uses .NET 2.0
  • Visual Studio, my application is built using VS2008

Which of these is correct?


The .net winforms webbrowser is just a wrapper for MSIE's own browser control (in shdocvw.dll). If you have IE8 installed, it uses IE8. If you have IE9 installed it uses IE9. For some silly reason they decided to have it fall back to IE7 rendering mode.

You can override that with a meta tag in the page header, or with a registry key. See MSIEs WebBrowser control hosted in winforms app runs in compatibility mode

0

精彩评论

暂无评论...
验证码 换一张
取 消