Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8113025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:41:40+00:00 2026-06-06T02:41:40+00:00

I am having a rather odd problem with the Gecko Webbrowser control, I have

  • 0

I am having a rather odd problem with the Gecko Webbrowser control, I have created my own class which inherits off of the Gecko Webcontrol and within the constructor of this I have set an event:

class fooGeckoClass: Gecko.GeckoWebBrowser
{
  public fooGeckoClass()
  {
    this.DomClick += new EventHandler<Gecko.GeckoDomEventArgs>(fooEventFunction);
  }

  private static void fooEventFunction(Object sender, Gecko.GeckoDomEventArgs e)
  {
    ((Gecko.GeckoWebBrowser)sender).Navigate("www.foo.com");
  }
}

I am using three of these controls in a manually created UserControl, the controls are loaded in dynamically at start up from a config file and added the the UserControl controls collection. When clicking on any of the three controls, all three will navigate to “www.foo.com” away from there original site. I had a look at:

e.StopPropagation();

Which specifies that it stops further propagation of events during an event flow, however it does also specify that it will handle all events in the current flow, I believe the events must have already been given to the controls before this has a chance to stop it as the the three controls will still fire the event. I also tried e.Handled = true to no avail. Has anyone encountered this problem before and have any kind of solution to make it only fire on the control that was clicked on?

EDIT:

It may be worth showing how the controls are added to the form seeing as this must be where the problem is occurring (it does not happen if the controls are just placed in a user control in a small test app).

private void fooUserControl_Load(object sender, EventArgs e)
{
  if (!this.DesignMode)
  {
    for (int iControls = 0; iControls < geckObs.Count(); iControls ++)
    {
          fooGeckoClass geckControl = new fooGeckoClass();
          this.Controls.Add(geckControl );
          break;
    }
   }
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:41:41+00:00Added an answer on June 6, 2026 at 2:41 am

    Odd answer but I seem to have resolved the issue, DomClick was being called at first run, changing to DomMouseClick or DomMouseUp has completely resolved the issue. I assume DomClick must be an event unto itself as it also doesn’t use the GeckoDomMouseEventArgs but the regular GeckoEventArgs.

    EDIT:

    To add to this, the site I was going to was actually calling DomClick when it had finished loading hence the reason it was being called at start up across all three browsers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im having rather an annoying problem. I have a class called Person and a
I'm having a rather odd problem with a C# user control. Basically it's a
I have a rather odd problem: I need to maintain a chunk of code
in developing a more complicated script I am having a rather odd problem with
I'm having a rather silly problem. I'll simplify the situation: I have a table
I'm having a rather odd issue where the menu for an activity works totally
I've been having this rather frustrating problem, and having failed so many times, I'm
Having a bit of a problem, Due to the source-control set-up we use, each
This is an odd problem, so I have to provide a bit of background.
I am trying to debug a web app, and am having some rather odd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.