Announcement
Collapse
No announcement yet.
Hide the cursor using User32.dll
Collapse
X
-
Build and run the attached sample project, and check the result. Note that the cursor remains hidden only while inside the application window, if you move it away from the application window, it will reappear.
UlrichAttached Files
Leave a comment:
-
-
Use this instead:
Code:-- hide cursor DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "0", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL); -- show cursor DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "1", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
Leave a comment:
-
-
Hide the cursor using User32.dll
Hi there,
I am trying to hide/show the cursor using User32.dll.
My OS is Windows 10 Pro x64.
I use this script to hide the cursor:
DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
And this one to show it:
DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "1", DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
But my app crashes executing these scripts.
What could be the reason?Tags: None
-
Leave a comment: