安裝方法則可以透過Nuget安裝
Install-Package Geckofx45
程式碼:
using Gecko; using System.Windows.Forms; namespace Test { public partial class Form1 : Form { public Form1() { InitializeComponent(); Xpcom.Initialize("Firefox"); var webBrowser = new GeckoWebBrowser(); webBrowser.Dock = DockStyle.Fill; webBrowser.Navigate("http://google.com.tw"); this.Controls.Add(webBrowser); } } }
執行結果:
參考資料:
https://www.nuget.org/packages/Geckofx45/
https://bitbucket.org/geckofx/geckofx/wiki/Home
https://bitbucket.org/geckofx/geckofx/wiki/DeveloperNotes