get current mouse cursor type(获取当前鼠标光标类型)
问题描述
如何获取当前的 GLOBAL 鼠标光标类型(沙漏/箭头/..)?在 Windows 中.
How do I get the current GLOBAL mouse cursor type (hourglass/arrow/..)? In Windows.
全局 - 我需要它即使鼠标在我的应用程序之外,或者即使我的程序是无窗口的.
Global - I need it even if the mouse is ouside of my application or even if my program is windlowless.
在 C#、Delphi 或纯 winapi 中,没关系...
In C#, Delphi or pure winapi, nevermind...
非常感谢您!
推荐答案
多年后,是时候回答我自己的问题了.以下是在 C# 中检查当前全局光标是否为沙漏的方法(如果需要,请根据自己的需要扩展代码):
After thee years its time to answer my own question. Here's how you check if the current global cursor is hourglass in C# (extend the code for you own needs if you need):
这篇关于获取当前鼠标光标类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!