11

I am working on a C# .NET application with System.Windows.Forms.WebBrowser.

IE is not responding properly, so i want to change to Mozilla Firefox.

How can I do this?

canolucas
  • 1,482
  • 1
  • 15
  • 32
Pankaj Mishra
  • 20,197
  • 16
  • 66
  • 103

7 Answers7

6

You can't.

The WebBrowser control is a wrapper around the IE ActiveX control, and cannot easily be swapped for Mozilla.

However, you can look into the Mozilla ActiveX Control

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • 2
    Using the ActiveX control would be a painful process. Someone has already created a managed wrapper: http://code.google.com/p/geckofx/ – jasonh Dec 22 '09 at 22:20
4

You'll want to replace the WebBrowser control with this project: http://code.google.com/p/geckofx/

jasonh
  • 29,297
  • 11
  • 59
  • 61
4

I was just looking at GeckoFX and WebKit.NET they might be of interest to you. If you want to change the Default WebBrowser control I do not believe this is possible.

GrayWizardx
  • 19,561
  • 2
  • 30
  • 43
2

System.Windows.Forms.WebBrowser is just a managed wrapper for the ActiveX control: SHDocVw.WebBrowser. The wrapper is not without bugs and may not provide the extensibility you need. If you have a working solution I don't suggest port it to use System.Windows.Forms.WebBrowser.

IE is not based on .Net so you can not use System.Windows.Forms.WebBrowser to control anything in IE. In fact I don't even suggest wiring BHO in .Net because only one version of CLR can be running in the IE process and your BHO can be running on an unexpected version of CLR.

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
serhio
  • 28,010
  • 62
  • 221
  • 374
1

Not sure if that's possible/easy, but mono uses Gecko# to implement its version of System.Windows.Forms.WebBrowser. Maybe you can reuse that or rip some useable parts out of that code?

Benjamin Podszun
  • 9,679
  • 3
  • 34
  • 45
0

You cannot achieve this using the System.Windows.Forms.WebBrowser control. It seems there are ways to embed the Gecko rendering engine into a WinForms application.

see this question: Replacing .NET WebBrowser control with a better browser, like Chrome?

Community
  • 1
  • 1
Matt Breckon
  • 3,374
  • 20
  • 26
0

Update 2016:

There are 3 additional options I can suggest that are still actively developed:

1. BrowseEmAll.Cef

A .Net component that can be used to integrate the Chrome engine into your .Net Application. Based on CefGlue but a little faster on updates to the latest Chrome version. Also there is a commercial support option available which might come in handy for some. Of course the component itself is open source.

2. BrowseEmAll.Gecko

Another .Net component which can be used to integrate the Firefox engine into your .Net application. This is based on Geckofx but unlike the current version of Geckofx this will work with a normal release build of Firefox. To use Geckofx you will need to build Firefox yourself. Again commercial support is available but the component itself is fully open source.

3. BrowseEmAll Core API

Need all the different browsers in your .Net Application? Which the BrowseEmAll Core API you can integrate Chrome, Firefox, Webkit and Internet Explorer into your application. This is a commercial product though so be warned.

(Full disclosure: I work for this company so take everything I say with a grain of salt)

daniel.herken
  • 1,095
  • 7
  • 19