in

ASP.NET Weblogs

Martin Spedding's Blog

Adventures in a disconnected world

Embedding Gecko(Mozilla rendering engine) in a .Net application

Over the weekend I had some spare time, so I thought  I wonder if you can use the Mozilla rendering engine(Gecko) within a .Net application as easily as you can IE ? This could be important in areas where people have concerns about using IE. It turns out it is as simple as a download, add COM component to the toolbar and if required adding a reference to the project. Even the intereface has been modelled on the IE model to make it simple to use. It is of cause unmanaged code but it works.

Visit Adam Lock's website  http://www.iol.ie/~locka/mozilla/mozilla.htm and download the Mozilla 1.71 Active X Control Installer.

Once you have downloaded run it and will install the files you need and register the control. Now all you have to do is add the control to the toolbar in Visual Studio, using the add/remove Items| COM Components. It is listed as the Mozilla Browser class.

You can now drag the control on to a form as you would any other control. You can use the navigate method on the control to display a given url. In fact the api of the control is the same as the IE api, which makes life very easy.

 

Published Jul 19 2004, 07:06 PM by MartinSp
Filed under:

Comments

 

TrackBack said:

At some point in any WinForms project, you're bound to need either: WYSIWYG text entry areas with text formatting Quick and dirty printed report generation The obvious choice for both of these things is HTML. No problem! I'll just...
October 15, 2004 5:03 PM
 

Keith Ealanta said:

Is there any way to get and use just the dll?

I run firefox2.0 normally, but I'd like to bind even 1.5 into an app I want to develop.

August 7, 2007 9:48 AM
 

anonym said:

By using that Activex, we lose all multiplatform capabilities (which would be the main reason to choose Firefox over IE for embedding).

Is there a more portable way?

January 5, 2008 3:44 AM
 

Paul Young said:

The Mozilla ActiveX control sucks.

Use this:

http://www.geckofx.org

February 5, 2008 2:24 PM
 

Julian Jacques Maurer said:

Paul, that link is really great...

Thank you ...^^

March 17, 2008 9:28 AM

Leave a Comment

(required)  
(optional)
(required)  
Add