3

I like to change the cursor, when user clicks a button. I can use FrameworkElement.Cursor. But it only changes the cursor for my current App.

But I need my entire Windows cursor should change. I mean if you move the mouse outside the my app, it should show my cursor (not the default arrow).

How to achieve this?

4
  • 1
    Why do you want to change the cursor for the environment outside your app? Commented Apr 27, 2012 at 6:15
  • 1
    You need to make a Win32 call using PInvoke. Commented Apr 27, 2012 at 6:17
  • 2
    For an example, I am doing an eyedropper control for wpf like the one Expression Blend and Visual Studio designer. I want to choose the color outside my app also. I did that. Now I am trying to change the cursor. But I dont have any idea. Commented Apr 27, 2012 at 6:18
  • 3
    That is a valid case (color eye dropper) for changing the system cursor. Next time, please include in your question why you want to do something as that will significantly improve the answers you receive. Commented Apr 27, 2012 at 7:50

1 Answer 1

1

In order to accomplish this you have to change a registry value then perform an API call, check this MSDN post for more details on how to do it:

How to change the system’s cursor using Visual C#.NET?

Also check this link:

Changing global mouse cursor OR cursor scheme with C#?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.