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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:27:00+00:00 2026-06-13T14:27:00+00:00

I need a way to track the mouse coordinates more precisely than this code.

  • 0

I need a way to track the mouse coordinates more precisely than this code. If you run this code and move your mouse really fast or change directions fast, the coordinates might look this: 50 and then 40. It seems that when the mouse moves fast it doesn’t track all the points the pointer covers, like in this example there are 10 coordinates that it skips. If I move it slowly, there’s no problem. I need a way to track all the pointer coordinates with no skips. I’ve tried the sample on Code Project that uses global hooks, with the same result. How can I do this? Is there a registry change that can be made that forces windows to track all the coordinates. Is it possible? I would prefer to do it with C# but will consider other ways too. Thanks.

private void Form1_MouseMove(object sender, MouseEventArgs e)
{
    if (num != 1)
    {
        listBox1.Items.Add(e.X.ToString());

    }
}
  • 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-13T14:27:01+00:00Added an answer on June 13, 2026 at 2:27 pm

    The mouse pointer doesn’t move across every pixel, if you move the mouse fast, it will move a whole bunch of pixels between events. The hardware simply doesn’t send a signal for each pixel that the mouse moves, it reports the distance that the mouse has moved since the last report.

    Instead of trying to track where the mouse is, use the Cursor.Clip property to limit the movement of the mouse:

    var rect = someControl.RectangleToScreen(new Rectangle(Point.Empty, someControl.ClientSize));
    Cursor.Position = new Point(rect.Left + rect.Width / 2, rect.Top + rect.Height / 2);
    Cursor.Clip = rect;
    

    Use an empty rectangle to release the mouse:

    Cursor.Clip = new Rectangle(0, 0, 0, 0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know an alternative for this? I need a way to keep track
I need a way to track instances of various classes, without those classes having
I need some way in c++ to keep track of the number of milliseconds
Is there an easy way to track how many pages a user on your
I need a way to track modified properties and audit them. I am hooking
That is the problem, i need to track the mouse movements(and register what component
I need to register mouse movement for a screensaver like feature. The code below
Hi I need some advice. I need a way to keep track of user
I need a way of stopping an animation that is triggered on mouse enter()
I'm trying to track the position of the mouse cursor and thus need to

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.