[英]Change mouse cursor color when left button is held down - Windows
I am trying to change cursor color when the mouse left button is in the 'hold down state'.当鼠标左键处于“按住状态”时,我试图更改光标颜色。 This is supposed to work in Windows 10, so something at the OS level, not in any specific program.
这应该在 Windows 10 中工作,所以在操作系统级别,而不是在任何特定程序中。 I would like to do this to know when "ClickLock" is enabled.
我想知道何时启用“ClickLock”。 Is there anyway to achieve this?
有没有办法实现这一目标?
I have tried with Autohotkey but nothing happens我尝试过使用 Autohotkey 但没有任何反应
; Cursor types
IDC_APPSTARTING := 32650
~LButton::
while GetKeyState("LButton", "P")
{
; this is the code to the Dll call, but I am not sure how to integrate it
hCursor:=DllCall("LoadCursor", "UInt", NULL,"Int", IDC_APPSTARTING, "UInt")
DllCall("SetCursor","UInt",hCursor)
}
return
For more info, please refer to: https://autohotkey.com/board/topic/32608-changing-the-system-cursor/更多信息请参考: https : //autohotkey.com/board/topic/32608-changed-the-system-cursor/
IDC_APPSTARTING := 32650
~LButton::
changeCursor(IDC_APPSTARTING)
Return
~LButton Up::
changeCursor()
Return
changeCursor(cursor := 0) {
if (cursor) {
CursorHandle := DllCall("LoadCursor", Uint, 0, Int, cursor)
Cursors = 32512,32513,32514,32515,32516,32640,32641,32642,32643,32644,32645,32646,32648,32649,32650,32651
Loop, Parse, Cursors, `,
DllCall("SetSystemCursor", Uint, CursorHandle, Int, A_Loopfield )
} else {
DllCall("SystemParametersInfo", UInt, 0x57, UInt, 0, UInt, 0, UInt, 0 )
}
}
Have you tried anything yet?你有没有尝试过什么? I would say probably start googling.
我会说可能开始谷歌搜索。 I came across a few different resources on the first try that pointed me in the direction of the registry keys, and even a nifty powershell script to set them on demand.
我在第一次尝试时遇到了一些不同的资源,它们为我指明了注册表项的方向,甚至是一个漂亮的 powershell 脚本来按需设置它们。 Do a little research, bro.
做个小调查,兄弟。 Happy coding.
快乐编码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.