简体   繁体   English

C#获胜。 表格-如何在Webbrowser控件中使XHTML支持?

[英]C# win. form - How to make XHTML support in webbrowser control?

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 . 问题是,当我尝试使用Windows窗体的默认WebBrowser控件打开G-Mail时 ,它说浏览器不支持HTML的较新版本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 ? 因此,有人可以建议我如何在WebBrowser控件中打开较新版本的G-Mail或如何使WebBrowser支持XHTML吗?

The WebBrowser control in C# may be rendering in IE7 mode. C#中的WebBrowser控件可能以IE7模式呈现。 To fix this your target machine would have to have a newer version of IE. 要解决此问题,您的目标计算机将必须具有较新版本的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 在Windows 32位或64位计算机上,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 在具有32位可执行文件的Windows 64位上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. 您将需要添加一个DWORD值,其名称是您的应用程序的名称。

Please refer to the MSDN Document for the values. 请参阅MSDN文档中的值。

Below is an example: 下面是一个示例:

修改注册表结果

Here is GMAIL Running in the webbrowsercontrol 这是在webbrowsercontrol中运行的GMAIL

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM