A way is with SetWinEventHook
with
EVENT_OBJECT_NAMECHANGE
and test if idObject = OBJID_CURSOR
in the event hook function
(tested on Windows 10 1909)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Is it possible to detect the cursor change when the mouse moves over a control - for example when the cursor moves to the side of a window it changes from default to the Cursors.SizeWE (left-right arrow) cursor. I have tried using the CursorChanged event but it doesn't fire when the cursor changes. Is there something I am not setting in the event handler or do I need to use another event handler? The current code I am using is:
Private Sub myForm_CursorChanged(sender As Object,
e As EventArgs) _
Handles Me.CursorChanged
MyCur As Windows.Forms.Cursor = Me.Cursor
End Sub
HotIndigo
A way is with SetWinEventHook
with
EVENT_OBJECT_NAMECHANGE
and test if idObject = OBJID_CURSOR
in the event hook function
(tested on Windows 10 1909)