How to change Windows cursor in WPF?

邮差的信 提交于 2019-12-10 18:15:32

问题


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?


回答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#?



来源:https://stackoverflow.com/questions/10345559/how-to-change-windows-cursor-in-wpf

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!