Click here to Skip to main content
12,826,676 members (35,407 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# C#4.0
I have a windows form and trying to calculate something when the user moves the cursor. Is there an event handler on changing the cursor position.
Posted 15-Jan-13 8:12am
Sandeep Mewara 15-Jan-13 13:28pm
Will not cursor position help in your something?
Jason Gleim 15-Jan-13 14:56pm
Just a word of warning... you should hook and unhook those events as-needed. Obviously, MouseMove generates a crap-load of events so you should only hook your event handler just before you need the data and then unhook it when you are done. And you should keep your event handler short and sweet. If your handler takes longer to execute than it takes for the next event to arrive, you can fill the event queue and bog down your app and/or start dumping events.

Processing events is one thing, processing events that generate hundreds or thousands of interrupts per second is a whole different beast.
Sergey Alexandrovich Kryukov 15-Jan-13 15:38pm
Mouse cursor or caret? In your application or outside?
missak boyajian 16-Jan-13 10:01am
I already found a solution. I used Timer in winform controls and I am able to do what I needed. But thanks for the replies.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100