[英]HTML5 on WebBrowser works slower than IE or other browser
I need to show HTML5 pages for WinForm and use component Webbrowser in mode emulation IE10. 我需要显示WinForm的HTML5页面,并在模式仿真IE10中使用组件Webbrowser。
When I open any hard page in Webbrowser I see it works slower than IE or other browsers. 当我在Webbrowser中打开任何硬页时,我看到它的工作速度比IE或其他浏览器慢。
For example 例如
Uri uri = new Uri("http://createjs.com/demos/easeljs/Cache.html");
webBrowser.Url = uri;
webBrowser.Navigate(uri);
At http://createjs.com/demos/easeljs/Cache.html page if set "cache enabled" fps in IE10 > 60 but Webbrowser shows only 15 fps 在http://createjs.com/demos/easeljs/Cache.html页面上,如果在IE10> 60中设置了“启用缓存” fps,但Webbrowser仅显示15 fps
Registry Mode Emulation IE10 for WebBrowser WebBrowser的注册表模式仿真IE10
private static void Emulation() // IE10
{
try
{
string keyName = @"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION";
string valueName = System.AppDomain.CurrentDomain.FriendlyName;
RegistryKey key = Registry.LocalMachine.OpenSubKey(keyName, false);
object FindKey = Registry.GetValue("HKEY_LOCAL_MACHINE\\"+ keyName,System.AppDomain.CurrentDomain.FriendlyName,null);
if (FindKey == null)
{
RegistryKey RegistryKey = Registry.LocalMachine.CreateSubKey(keyName);
RegistryKey.SetValue(System.AppDomain.CurrentDomain.FriendlyName, 10001, RegistryValueKind.DWord);
}
}
catch (Exception Ex)
{
Console.WriteLine("Registry update error: " + Ex.Message);
Console.WriteLine("Can't change browser version.");
}
}
Any advice how to increase performance WebBrowser on WinForm? 有什么建议如何在WinForm上提高WebBrowser的性能?
What about using another Default Browser? 使用其他默认浏览器怎么办?
https://cefsharp.github.io/ https://cefsharp.github.io/
Cefsharp is a port of Chromium to .NET! Cefsharp是Chromium到.NET的端口! You can use it instead of IE...
您可以使用它代替IE ...
Or you could this: 或者您可以这样:
http://www.awesomium.com/#download http://www.awesomium.com/#download
Awesomium is a HTML Engine... Awesomium是一个HTML引擎...
You must set in the registry to use the latest IE version or Edge. 您必须在注册表中设置以使用最新的IE版本或Edge。 Otherwise the oldest IE7 will be used.
否则,将使用最早的IE7。 Use latest version of Internet Explorer in the webbrowser control
在Webbrowser控件中使用Internet Explorer的最新版本
当我将IE从10版本更新到11版本时,组件WebBrowser中的性能提高到了正常值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.