2

Currently i am facing a crisis here.

The problem is that when i try to open G-Mail with the default WebBrowser control of windows form it says that browser does not support newer version of HTML which is XHTML.

So, can anybody suggest me a way how to open newer version of G-Mail in WebBrowser control or how can you make the WebBrowser support XHTML?

Developer Nation
  • 374
  • 3
  • 4
  • 20

1 Answers1

3

The WebBrowser control in C# may be rendering in IE7 mode. To fix this your target machine would have to have a newer version of IE. In addition if you need to force a particular rendering mode you can add a value for your app in the following registry entries:

On Windows 32 bit or 64 bit machine HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

On Windows 64 bit with a 32bit executable HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

You will need to add a DWORD value whose name is the name of your app.

Please refer to the MSDN Document for the values.

Below is an example:

Modifying Registry Results

Here is GMAIL Running in the webbrowsercontrol

enter image description here

Luis Ramirez
  • 414
  • 3
  • 7
  • i think this might work just need to know from where did you get this knowledge about the problem? from internet or from any software courses? – Developer Nation Sep 12 '15 at 11:33
  • 1
    Had this issue before, so I knew what to look for. Here are some helpful links. [Rick Strahl named Web Browser Control – Specifying the IE Version](https://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version) Oldest entry I can find on this is from an MSDN blog post [MSDN Original Entry](http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx) This is entry on [Stackoverflow](http://stackoverflow.com/questions/12796070/change-default-webbrowser-rendering-mode-in-c-sharp) is not too detailed. – Luis Ramirez Sep 12 '15 at 17:35
  • Mr. Luis is there any way to open newer version of gmail without upgrading to new IE because in XP it does not support newer IE. – Developer Nation Sep 18 '15 at 11:10