GeckoFX (Firefox) WebBrowser Control from IronPython

A Japanese blogger shows off how to use the GeckoFX (Firefox) Windows Forms WebBrowser control from IronPython. This allows you to embed webpages in Windows Forms applications using the Gecko rendering engine.
The example code uses the winforms sample that comes with IronPython:

import sys
sys.path.append("(IronPythonTutorial")
import winforms
from System.Windows.Forms import *
f = Form()
f.Text = "GeckoFX"
f.Show()
import clr
clr.AddReference("Skybound.Gecko.dll")
from Skybound.Gecko import *
Xpcom.Initialize("(Firefox 3")
browser = GeckoWebBrowser()
browser.Parent = f
browser.Dock = DockStyle.Fill
browser.Navigate("about:robots")

Comments

Popular posts from this blog

Extending Abobe Flash Player and AIR with Python and Ruby

Should Python Projects Support IronPython and Jython?

Further Adventures of the Debugger