0

Ever Thought if it was possible to not WebBrower control and use the Firefox Browser in your c# window Application...??

Yes ,, It is possible using GeckoFx wrapper class for C#.net and vb also.

You will need the Followings:

1. GeckoFx Wrapper
2. Xul Runner (Download the zip file from here)

For Complete tutorial and download links : [snipped]

Edited by Ezzaral: Snipped link. Blog promotion is not allowed.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Skybound.Gecko;

namespace GeckoNet
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Skybound.Gecko.Xpcom.Initialize("c:\\xulrunner\\"); //Whatever the path to xulrunner runtime 
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            geckoWebBrowser1.Navigate("www.google.com");
        }

        private void btnStop_Click(object sender, EventArgs e)
        {
            geckoWebBrowser1.Stop();
        }

        private void btnRefresh_Click(object sender, EventArgs e)
        {
            geckoWebBrowser1.Refresh();
        }

        private void btnSavePage_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.Filter = " Html File | *.html";
            if (sfd.ShowDialog() == DialogResult.OK)
            {
                geckoWebBrowser1.SaveDocument(sfd.FileName);
            }
        }
    }
}
3
Contributors
2
Replies
15
Views
6 Years
Discussion Span
Last Post by newlonator
0

I have no errors in my code and my code is the exact same as the code provided, but when i run it i get and OutofMemoryException. Help Please!!!

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.