Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Capture and replace mouse cursor on the fly

Capture and replace mouse cursor on the fly

Scheduled Pinned Locked Moved C#
csharphardwarequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MarkB123
    wrote on last edited by
    #1

    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.

    D 1 Reply Last reply
    0
    • M MarkB123

      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.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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...

      M 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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...

        M Offline
        M Offline
        MarkB123
        wrote on last edited by
        #3

        OK Dave, Thanks for the response. It's not the answer I wanted to hear though :{, I had hoped there was some way. Regards Mark

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups