GeckoFx 45 Navigate / GoBack / Reload Methods Not Working
<p>I'm using Winforms, C#, and geckofx-45 Windows 32bit 45.0.10 via Nuget (<a href="https://www.nuget.org/packages/Geckofx45/" rel="nofollow">https://www.nuget.org/packages/Geckofx45/</a>) and I'm trying to wire up browser functionality to three buttons for the following:</p>

<ul>
<li>browser.Navigate("www.bing.com");</li>
<li>browser.GoBack();</li>
<li>browser.Reload();</li>
</ul>

<p>I'm running this in Visual Studio 2015 and my breakpoints indicate I have no issues with the buttons. The code is called for each of those methods and no changes are reflected in the browser.</p>

<p>To clarify: I have the control added and created in a Form_Load event-bound method. In that method the browser.Navigate, browser.Reload, and browser.GoBack methods work programmatically. However, I cannot get those methods to work anywhere outside of that.</p>

<p>Any ideas? Maybe I'm just doing something incorrectly?</p>

<p>Thank you!</p>

<p><strong>Form1_Load Method Code</strong></p>

<pre><code>        private void Form1_Load(object sender, EventArgs e)
    {
        //Configure Browser
        browser = new GeckoWebBrowser();

        GeckoPreferences.User["places.history.enabled"] = false;
        GeckoPreferences.User["security.warn_viewing_mixed"] = false;
        GeckoPreferences.User["plugin.state.flash"] = 0;
        GeckoPreferences.User["browser.cache.disk.enable"] = false;
        GeckoPreferences.User["browser.cache.memory.enable"] = false;
        GeckoPreferences.User["browser.xul.error_pages.enabled"] = false;
        GeckoPreferences.User["dom.max_script_run_time"] = 0; //let js run as long as it needs to; prevents timeout errors
        GeckoPreferences.User["browser.download.manager.showAlertOnComplete"] = false;
        GeckoPreferences.User["privacy.popups.showBrowserMessage"] = false;
        browser.AllowDrop = false;

        this.Controls.Add(browser);
        browser.Dock = DockStyle.None;
        browser.Size = new System.Drawing.Size(1024, 700);
        browser.Margin = new System.Windows.Forms.Padding(0);
        browser.MinimumSize = new System.Drawing.Size(20, 20);
        int leftOffset = (this.ClientSize.Width - browser.Width) / 2;
        browser.Location = new System.Drawing.Point(leftOffset,2);

        //Hooking browser events
        browser.ShowContextMenu += new EventHandler&lt;GeckoContextMenuEventArgs&gt;(browser_ShowContextMenu); //Strip out undesirable options from the right click menu.
        browser.CreateWindow += new EventHandler&lt;GeckoCreateWindowEventArgs&gt;(browser_CreateWindow); //Prevent the browser from opening popup windows in new windows / links in new windows.
        browser.NSSError += new EventHandler&lt;GeckoNSSErrorEventArgs&gt;(browser_NSSError); //Bypass SSL certificate issues
        browser.NavigationError += new EventHandler&lt;GeckoNavigationErrorEventArgs&gt;(browser_NavigationError); //If there are any issues encountered during page loads
        browser.Navigated += new EventHandler&lt;GeckoNavigatedEventArgs&gt;(browser_Navigated); //React appropriately to URL navigation

        //Navigate the browser as desired.
        browser.Navigate(defaultHomeWebsite);
    }
</code></pre>

<p><strong>Form Buttons that are fired but the browser methods don't Work</strong></p>

<pre><code>    /// &lt;summary&gt;
    /// Browser Button: Go Home
    /// &lt;/summary&gt;
    /// &lt;param name="sender"&gt;&lt;/param&gt;
    /// &lt;param name="e"&gt;&lt;/param&gt;
    private void button4_Click(object sender, EventArgs e)
    {
        browser.Navigate("www.bing.com");
    }

    /// &lt;summary&gt;
    /// Browser Button: Go Back
    /// &lt;/summary&gt;
    /// &lt;param name="sender"&gt;&lt;/param&gt;
    /// &lt;param name="e"&gt;&lt;/param&gt;
    private void button3_Click(object sender, EventArgs e)
    {
        browser.GoBack();
    }

    /// &lt;summary&gt;
    /// Browser Button: Refresh Page
    /// &lt;/summary&gt;
    /// &lt;param name="sender"&gt;&lt;/param&gt;
    /// &lt;param name="e"&gt;&lt;/param&gt;
    private void button2_Click(object sender, EventArgs e)
    {
        browser.Reload();
    }
</code></pre>