Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacing .NET WebBrowser control with a better browser, like Chrome? [closed]

Is there any relatively easy way to insert a modern browser into a .NET application?

As far as I understand, the WebBrowser control is a wrapper for IE, which wouldn't be a problem except that it looks like it is a very old version of IE, with all that entails in terms of CSS screw-ups, potential security risks (if the rendering engine wasn't patched, can I really expect the zillion buffer overflow problems to be fixed?), and other issues.

I am using Visual Studio C# (express edition - does it make any difference here?)

I would like to integrate a good web browser in my applications. In some, I just use it to handle the user registration process, interface with some of my website's features and other things of that order, but I have another application in mind that will require more err... control.

I need:

  • A browser that can integrate inside a window of my application (not a separate window)
  • A good support for CSS, js and other web technologies, on par with any modern browser
  • Basic browser functions like "navigate", "back", "reload"...
  • Liberal access to the page code and output.

I was thinking about Chrome, since it comes under the BSD license, but I would be just as happy with a recent version of IE.

As much as possible, I would like to keep things simple. The best would be if one could patch the existing WebBrowser control, which does already about 70% of what I need, but I don't think that's possible.

I have found an activeX control for Mozilla (http://www.iol.ie/~locka/mozilla/control.htm) but it looks like it's an old version, so it's not necessarily an improvement.

I am open to suggestions

like image 622
Sylverdrag Avatar asked Apr 26 '09 09:04

Sylverdrag


People also ask

What is browser control?

The WebBrowser control has several properties, methods, and events that you can use to implement controls found in Internet Explorer. For example, you can use the Navigate method to implement an address bar, and the GoBack , GoForward , Stop , and Refresh methods to implement navigation buttons on a toolbar.


1 Answers

Checkout CefSharp .Net bindings, a project I started a while back that thankfully got picked up by the community and turned into something wonderful.

The project wraps the Chromium Embedded Framework and has been used in a number of major projects including Rdio's Windows client, Facebook Messenger for Windows and Github for Windows.

It features browser controls for WPF and Winforms and has tons of features and extension points. Being based on Chromium it's blisteringly fast too.

Grab it from NuGet: Install-Package CefSharp.Wpf or Install-Package CefSharp.WinForms

Check out examples and give your thoughts/feedback/pull-requests: https://github.com/cefsharp/CefSharp

BSD Licensed

like image 104
chillitom Avatar answered Sep 21 '22 17:09

chillitom