Forum Discussion
Hi Mathijs,
Not sure what to advice as for your pseudo code, but here is a code that I used somewhere in time (which mean that it might not work on latest OSes) to get cursor state...
'-----------------------------------------------------------------------------
'From: http://www.sqaforums.com/showflat.php?Cat=0&Number=533710&an=0&page=0&gonew=1
Function GetMouseCursor()
Dim nHandle
Dim nProcessID
Dim nThreadID
Dim nCursor
GetMouseCursor = -1
nHandle = Win32API.GetForegroundWindow()
nProcessID = Win32API.GetWindowThreadProcessId(nHandle, null)
nThreadID = Win32API.GetCurrentThreadId()
Call Win32API.AttachThreadInput(nProcessID, nThreadID, true)
nCursor = Win32API.GetCursor()
Call Win32API.AttachThreadInput(nProcessID, nThreadID, false)
GetMouseCursor = nCursor
Call Log.Message(nCursor)
' Some of the common mouse cursor types:
'var c_nMouse_Pointer = 65555;var c_nMouse_Hourglass = 65559;var c_nMouse_Text = 65557;var c_nMouse_Hand = 65583;
End Function
'-----------------------------------------------------------------------------
Related Content
- 26 days ago
- 5 years ago
- 10 years ago
Recent Discussions
- 5 hours ago