Endless Mouse Move Events
-
I have an object of type UserControl that I occasionally have problems with. Normally, when I move the mouse over the object, windows will generate a mouse move event as advertized - only when the mouse moves. Occasionally, however, windows goes crazy on me and generates a gazillion mouse move events for as long as the mouse is over the object and it is not even moving. I get so many of these events that it inhibits the application from performing until I move the mouse off the object. Has anyone seen this type of behavior before and, if so, was there anything you could do about it? Darryl Borden Principal IT Analyst darryl.borden@elpaso.com
-
I have an object of type UserControl that I occasionally have problems with. Normally, when I move the mouse over the object, windows will generate a mouse move event as advertized - only when the mouse moves. Occasionally, however, windows goes crazy on me and generates a gazillion mouse move events for as long as the mouse is over the object and it is not even moving. I get so many of these events that it inhibits the application from performing until I move the mouse off the object. Has anyone seen this type of behavior before and, if so, was there anything you could do about it? Darryl Borden Principal IT Analyst darryl.borden@elpaso.com
You are probably doing a wrong invalidate during the event handling, I have seen the same behaviour on the PropertyGrids TypeConvertors. top secret
-
I have an object of type UserControl that I occasionally have problems with. Normally, when I move the mouse over the object, windows will generate a mouse move event as advertized - only when the mouse moves. Occasionally, however, windows goes crazy on me and generates a gazillion mouse move events for as long as the mouse is over the object and it is not even moving. I get so many of these events that it inhibits the application from performing until I move the mouse off the object. Has anyone seen this type of behavior before and, if so, was there anything you could do about it? Darryl Borden Principal IT Analyst darryl.borden@elpaso.com
Yup - I've experienced it. It was an OpenGL control with mouse interaction, and didn't bother to work out WHY it happened - I just stopped it being a pain with following pseudocode: PointOrWhatever savedPosition; void HandleMouseEvent(whatever args) { if(args.position == savedPosition) return; DoMyMouseMovingStuff(); savedPosition = args.position; } Regards Brewman