How to use Gecko in C #

I need a Gecko web browser control

I need a sample code or a link that explains how to use GECKO

If someone used Gecko, I could do with some tips

+7
source share
3 answers

An original tutorial with detailed snapshots can be found here .

To embed the Gecko browser in your winform application, you need to:

  • XulRunner: XULRunner is a Mozilla runtime package that you can use to download XUL + XPCOM applications that are as rich as Firefox and Thunderbird. It provides mechanisms for installing, updating, and uninstalling these applications. XULRunner can be downloaded here . Select the version you want.
  • GeckoFx.net build file, which you can download from here . Also select the correct version that matches the XulRunner version.

  • Unzip GeckoFX-330.zip, you will get the files below:

enter image description here

  • Add the links to the DLL as shown above, click the browse button and select Geckofx-Core.dll and Geckofx-Winforms.dll

enter image description here enter image description here

  • In the toolbar, right-click, and then select "Select Item", select Geckofx-Winforms.dll, and the Geformo winform control will be displayed in the toolbar.

enter image description here enter image description here

  • Drag the GeckoWebBrowser control into the winform constructor and call it "browser" enter image description here

  • In the form1.cs file, add the code below: enter image description here

String Gecko.Xpcom.Initialize (@ ".. \ xulrunner"); indicates where the xulrunner runtime is located. In this case, we put it in the folder (@ ".. \ xulrunner").

Now run the application, yes ~~~

enter image description here

+18
source

GeckoFX is constantly moving here:

https://bitbucket.org/geckofx/

+6
source

You should check out http://code.google.com/p/geckofx/ . For some sample code, check out the Wiki page.

+2
source

All Articles