3

Recently, I'm developing an App using Winform and WebBrowser Control. But the WebPage seems different in WebBrowser, and then I find that if the App runs in a computer which just installed IE6, some pages are look weird. I want to know the relationship between the control and IE installed on my computer, and trying to do this: give my user an stable UI even the IE installed on the user's computer are different.

Thanks!

MSalters
  • 159,923
  • 8
  • 140
  • 320
wbpmrck
  • 31
  • 2

2 Answers2

1

The WebBrowser control in C# is just MSHTML, also known as the Trident Engine. Internet Explorer is a very simple UI wrapper for MSHTML, but it also servers as the update mechanism for MSHTML: your C# gets the MSHTML version matching the installed IE version. And yes, that can be IE6.

The solution is of course to distribute your own web browser component, e.g. WebKit (which powers Chrome and Safari)

MSalters
  • 159,923
  • 8
  • 140
  • 320
  • thanks,could you please give some links about how to distribute a specified version of Trident Engine to the client's computer? – wbpmrck May 23 '11 at 09:00
  • @wbpmrck A setting in the registry can be used to force a specific version, see here: http://msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation – GrahamMc Jul 23 '13 at 08:45
0

You could replace default browser with more stable :

Replacing .NET WebBrowser control with a better browser, like Chrome?

Community
  • 1
  • 1
Michał Kuliński
  • 1,828
  • 3
  • 26
  • 50