This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18379|Reply: 1

[WinForm] Webbrowser-like browser controls

[Copy link]
Posted on 2/26/2016 3:05:52 PM | | |

Now using Webbrowser, put it in an independent thread, when loading the web page, the program will still become stuck, unresponsive, not unresponsive, and the CPU usage will soar to 30%.
It doesn't get stuck when the web page doesn't load.

In addition, using InvokeMember("Click") to simulate clicking on some links is invalid, and the break point can go to the correct HtmlElement, but the simulated click does not respond.

Not all clicks are invalid, just some buttons or links are invalid.


Is there a way to solve the above problems?
If not, then is there a third-party control that takes up less CPU, which supports assigning values to text boxes, simulating clicks, and operating scroll bars.

WebKit .NET
webkit-sharp
CefSharp
awesomium
OpenWebKitSharp
geckofx
MozNET Web Component





Previous:Which is more powerful, the browser kernel Gecko or WebKit?
Next:WebKit.net the solution to the exception WebKitBrowser.dll
 Landlord| Posted on 2/26/2016 3:29:06 PM |
If that's it, it's simple, but the website used by the project has extremely poor compatibility with IE (complaining: I personally think IE is too bad and the support for standards is too poor), so I had no choice but to look for other similar WebBrowser controls and found a few good replacement controls:

GeokoFx: A Firefox Geoko Engine Windows Forms Package, download on google Address: http://code.google.com/p/geckofx/ Official website: http://www.geckofx.org/
WebKit.NET:webkit的.NET封装,下载地址:http://sourceforge.net/projects/webkitdotnet/

I originally decided to use GeokoFx, because the website used by the project is very fast to open with Firefox, but I searched for a few days and didn't find out how to pass a js object to the control, when I found that Qt's webbroswer control is also an encapsulated WebKit control, I decided to use WebKit, but WebKit.NET did not directly provide a way to pass the object, and then I found another good thing:

open-webkit-sharp:对webkit.net的又一次封装,提供了很多新功能。google上下载地址:http://code.google.com/p/open-webkit-sharp/
The following is very simple, download open-webkit-sharp, copy all the files in the Core folder and the References folder to your project directory, then open your project and add the reference OpenWebKitSharp.dll and WebKit.Interop.dll (if your project is running on .NET Framework 2.0 or 3.5 references Binary_ These two files in the NET2 folder, in the case of NET4.0, refer to these two dlls in the Binary folder); Then there's the Toolbox - > Selections - > Selection OpenWebKitSharp.dll and drag WebKitBrowser from the Toolbox onto your form. It's a big step now, but to avoid all sorts of errors when using it, we need to install two supporting files first:
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com