C # replaces the Webbowser control with the Chrome kernel summary
Due to the recent need to do a browser-style software, there are many places to use jquery and Bootstrap, but in C #, the default WebBrowser control is the default use of IE core, and the low version of IE in JS loading is always prone to problems, so, Plan to replace IE with Chrome's kernel.
Preparatory work
First of all, you have to understand that the chrome kernel is not called chrome, but WebKit, so we just have to find the WebKit project.
1. Download the WebKit Project bin with the following URL:
Https://sourceforge.net/projects/webkitdotnet/files/WebKit%20.NET%200.x/0.5/WebKit.NET-0.5-bin-cairo.zip/download.
2. Download the extracted directory structure as follows:
3. Put everything under the bin folder (yes!). is all files copied) and pasted into the project folder, the target directory is: project name/bin/debug/
4. Import the Webkitbrowser DLL into your project. The operation in VS2015 is as follows (other analogy):
Under Solution Explorer, select your project name, then right-click Add, then select Reference, such as:
5. In the dialog box that pops up. Choose Browse, browse ..., and then select your: project name/bin/debug before pasting the WebKitBrowser.dll import, the results are as follows:
Coding phase
1. You have to do, first select the bin directory you downloaded before the WebKitBrowser.dll, and then copy, such as:
2. In the control bar of C #, build yourself a custom C # control bar, such as my call WebBrowser, and then paste the dll you just copied in the toolbar, with the final effect as:
You can then use the Webkitbrowser control normally.
3. The browser's kernel can be tested via this website, url: http://ie.icoa.cn/
As for the running code, the following is given:
1 private void Form1_Load (object sender, EventArgs e) 2 {3 webkitbrowser1.navigate ("http://ie.icoa.cn/"); 4}
Here are the pre-and post-configuration comparisons:
Before configuration:
After configuration:
Thanks
Thanks to the s_p comments, and if you want to make a release version instead of debug, your directory should be: project name/bin/release.
Add
Thanks to the park friend's point, webkitbrowser this project has not been maintained, with. NET version of the promotion, is also likely to have problems, so the recommendation of another more useful cefsharp, the specific process and webkitbrowser basically consistent.
If a friend wants to use Cefsharp, welcome to view this article, speak very detailed, from Codeceo: Portal here:)
Conclusion
In fact, change a kernel is not so complex, dare to try, I think you can also, have questions welcome message!
C # Chrome Kernel