Click here to Skip to main content
11,707,470 members (73,322 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: 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 7:12am
Sandeep Mewara at 15-Jan-13 13:28pm
Will not cursor position help in your something?
Jason Gleim at 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 at 15-Jan-13 15:38pm
Mouse cursor or caret? In your application or outside?
missak boyajian at 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
0 Maciej Los 195
1 Mika Wendelius 190
2 OriginalGriff 156
3 Sergey Alexandrovich Kryukov 145
4 chainerlt 110
0 OriginalGriff 9,178
1 Sergey Alexandrovich Kryukov 8,562
2 CPallini 5,189
3 Maciej Los 4,806
4 Mika Wendelius 3,706

Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2015
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