Capture and replace mouse cursor on the fly
-
Hi All, A bit of background on what and why I am trying to do this. I have a 3rd party c# component embedded in my form. The component controls the cursor when the mouse is over it. I can set different cursors for the component when I initialise it but they must be mono-chrome as this is all it can handle. The component also does not process right-click menu clicks, but I have managed to circumvent this using a mouse and keyboard hook to process these actions. Ideally what I would like to do is something similar with the mouse cursor - ie trap when the component is changing it's cursor according to the action being performed then selectively repaint the cursors with my own versions. I really need to be able to listen for some sort of event being raised I think. Does anyone know if this is even possible? Any code or links? Many Thanks.
-
Hi All, A bit of background on what and why I am trying to do this. I have a 3rd party c# component embedded in my form. The component controls the cursor when the mouse is over it. I can set different cursors for the component when I initialise it but they must be mono-chrome as this is all it can handle. The component also does not process right-click menu clicks, but I have managed to circumvent this using a mouse and keyboard hook to process these actions. Ideally what I would like to do is something similar with the mouse cursor - ie trap when the component is changing it's cursor according to the action being performed then selectively repaint the cursors with my own versions. I really need to be able to listen for some sort of event being raised I think. Does anyone know if this is even possible? Any code or links? Many Thanks.
There is no notification that the mouse cursor was changed by an outside process. Since it can change just moving from control to control or window to window, this would get very tedious to handle. I don't know of any way you're going to be able to handle this.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
There is no notification that the mouse cursor was changed by an outside process. Since it can change just moving from control to control or window to window, this would get very tedious to handle. I don't know of any way you're going to be able to handle this.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...