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 6920057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:05:58+00:00 2026-05-27T10:05:58+00:00

Either I am not totally understanding how events work or Delphi Prism has gone

  • 0

Either I am not totally understanding how events work or Delphi Prism has gone mad!!!

I have a winform, mousedown event and mousemove event. Whenever I click the left mouse button only, MouseDown event fires as expected but ALSO MouseMove event fires right after when it is not suppose to.

Here is the piece of code from my winform designer where the methods are assigned to events.

  self.ClientSize := new System.Drawing.Size(751, 502);
  self.KeyPreview := true;
  self.Name := 'Maker';
  self.Text := 'Window Maker';
  self.Load += new System.EventHandler(@self.Maker_Load);
  self.FormClosing += new System.Windows.Forms.FormClosingEventHandler(@self.Maker_FormClosing);
  self.Shown += new System.EventHandler(@self.Maker_Shown);
  self.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseDoubleClick);
  self.MouseDown += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseDown);
  self.MouseMove += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseMove);
  self.MouseUp += new System.Windows.Forms.MouseEventHandler(@self.Maker_MouseUp);
  self.Paint += new System.Windows.Forms.PaintEventHandler(@self.Maker_Paint);
  self.ObjectPopup.ResumeLayout(false);
  self.ResumeLayout(false);

What am I doing wrong? Please, help I am getting frustrated over this, because I have mousemove events in other parts of my program. They work fine. I can’t seem to figure out why this perticular mousemove event is acting up.

  • 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-05-27T10:05:58+00:00Added an answer on May 27, 2026 at 10:05 am

    I forget the reason that happens.

    But for a possible work around:

    Point _LastPoint = Point.Empty;
    
    private void Form1_MouseMove(object sender, MouseEventArgs e) {
      if (_LastPoint != e.Location) {
        _LastPoint = e.Location;
        // run MouseMove code:
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Either I missed some backlash or backlashing does not seem to work with too
I have 2 input boxes that are not disabled. When either gets focus no
Unfortunately, Devel::Cover does not yet work with threads. It doesn't work with prefork either.
How do node.XPathSelectElement() and node.XPathSelectElements() behave when the selection is either not a NodeSet
Unit testing with C/C++: What do you teach people who either did not do
I'm not too inexperienced with ReWrite (not a master either, though) so I was
I'm not really asking whether I should use either a RDBMS or config files
Just could not get this one and googling did not help much either.. First
I know I'm not asking this quite right, either. Please help me better form
I've never used AJAX and am, quite frankly, not much versed in JS either.

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.