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.

 

Comments

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

Julian Jacques Maurer said:

Paul, that link is really great...

Thank you ...^^

# March 17, 2008 9:28 AM

Srini said:

Is this activeX will support 3.6

# October 19, 2010 8:10 AM

service said:

Kv2NUj I think this is a real great blog.Really looking forward to read more. Great.

# May 16, 2012 12:16 AM

level g vocabulary answers said:

Great, thanks for sharing this article post.Thanks Again. Much obliged.

# October 26, 2012 4:37 AM

visit said:

Major thankies for the blog post. Great.

# November 1, 2012 3:02 PM

Bowers said:

Your own article features verified necessary to myself.

It’s extremely educational and you are certainly quite

educated of this type. You have got opened up my own sight for you

to various views on this kind of subject matter using

intriquing, notable and sound articles.

# March 31, 2013 5:34 PM