+ Reply to Thread
Results 1 to 2 of 2

Thread: Embedding Gecko[FireFox Engine] into application

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    35

    Tutorial : Embedding Gecko[FireFox Engine] into application

    I would like to embed the gecko web browser engine into my application , anybody did that before ?
    Is it possible actually ?

    Thanks in advance.
    Last edited by alias; 11-09-2012 at 12:00 AM.

  2. #2
    Junior Member
    Join Date
    May 2012
    Posts
    36
    Steps :
    1- download the .net library
    2- download the xulrunner
    3- Inserting the GeckoWebbrowser control into application

    Getting Started
    ---------------
    GeckoFX is a .NET wrapper around XULRunner, a runtime based on the same source
    code as Firefox. You can add the control to your windows forms app and use it much the
    same way as System.Windows.Forms.WebBrowser.

    Since GeckoFX is a wrapper, you need to have the XULRunner runtime somewhere on your
    development system (and redistribute it with your application). GeckoFX now works best
    with XULRunner 1.9.1 (Firefox 3.5).

    1) You have to download the GeckoFX 1.9.1.0 (Binary Only) from HERE That is the .net Library you are going to use.

    2) Download XULRunner 1.9.1 from HERE And choose xulrunner-1.9.1.1.en-US.win32.zip

    3) Now extract the GeckoFX 1.9.1.0 and xulrunner-1.9.1.1.en-US.win32.zip you just downloaded and you will find 2 sub folders > bin & chrome , bin contains the DLL Library to be imported with your application and the contents of chrome folder just paste it inside the xurlrunner chrome`s folder.

    4) OPTIONAL: There are some files included with XULRunner which GeckoFX doesn't need. You may
    safely delete them:
    AccessibleMarshal.dll
    dependentlibs.list
    mozctl.dll
    mozctlx.dll
    java*.*
    *.ini
    *.txt
    *.exe

    5) Now open your application and add references > Add Skybound.Gecko.dll

    6) Inside your Public Form just beneath InitializeComponent(); type : Skybound.Gecko.Xpcom.Initialize("xulrunnerFOLDER") ;
    xulrunnerFOLDER represents the path to the xulrunner folder path and that step is very IMPORTANT

    7) Now go to the ToolBox menu and right click on All Windows Forms and choose Choose Items <Wait a minute it takes time to load here on my laptop>

    8) Now make sure you are on the .Net FrameWork Components and click on Browse then choose Skybound.Gecko.dll

    9) The GeckoWebBrowser should appear and it will be automatically checked after import and now click OK

    10) go to your toolbox and you will find the GeckoWebBrowser is on the controlbox beneath WebBrowser Control.

    Now some snippets of the GeckoWebBrowser :
    Code:
                geckoWebBrowser1.BackColor = Color.White;
                geckoWebBrowser1.NoDefaultContextMenu =true;
                geckoWebBrowser1.Navigate("http://www.firefox.com");
    You will find out that the methods are pretty the same , so you wont have any problem with that.

    Finally Do not forget to say "NO TO Internet Explorer"

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts