gtechies Posted December 2, 2009 Share Posted December 2, 2009 Hey, I am wondering how you hide the mouse cursor. Ive seen the function GUISetCursor(16) which will hide the mouse cursor in a window (16 is the value for a blank cursor). However, I don't want it to just be inside a GUI and would like it to be whenever. It would be like the "Hide cursor while typing" only it hides the cursor at all times. I have also seen MouseGetCursor() which will get the value of the cursor, but I didn't see a MouseSetCursor() Thanks, GT Link to comment Share on other sites More sharing options...
lordicast Posted December 2, 2009 Share Posted December 2, 2009 (edited) This should get you started HotKeySet('{Esc}', 'End') Global Const $USER32 = DllOpen("user32.dll") Global Const $cDir = 'C:\Windows\Cursors' ; Cursor Dir for vista ; Global Const $Cursor = $cDir & '\wagtail.ani' ;Cursor that it will change to Global Const $CursorBack = $cDir & '\aero_arrow_l.cur' MouseSetCursor($Cursor) ;Set Cursor While 1 Sleep(10) WEnd Func MouseSetCursor($nCursor) ;Load $cDll = DllCall($USER32, "hwnd", "LoadCursorFromFile", "str", $nCursor) If @error <> 0 Then Return ;Change DllCall($USER32, "int", "SetSystemCursor", "int", $cDll[0], "int", 32512) If @error <> 0 Then Return EndFunc ;==>MouseSetCursor Func End() MouseSetCursor($CursorBack) Exit EndFunc ;==>End Edit: Bad Local I would just find a blank cursor Edited December 2, 2009 by lordicast [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
matthieuvb Posted June 23, 2010 Share Posted June 23, 2010 Tray this: #Include <WinAPI.au3> _WinAPI_ShowCursor(False) But this works only in a GUI. [font=Helvetica, Arial, sans-serif][background=rgb(252, 252, 250)][/background][/font] Link to comment Share on other sites More sharing options...
Anzelm Posted May 15, 2011 Share Posted May 15, 2011 Hello! I use your script, but my problem is: when i replaced a cursor with an other one (blank), i cant change again, to the original one. So: i can change back one cursor, but it's not the original. I want to change back the cursor, what the user use, when he start my software. I can change it back, if the user use a profile for it. You can read a registry value, from this root: "HKEY_CURRENT_USER\Control Panel\Cursors". Its a REG_EXPAND_SZ value, called Arrow. But you cant read it, if its empty. I was looking for the windows default cursor, but i didn't find it in the Cursors root, in the Windows folder. Can you help me? Have you same idea for me? Whats the method for it? *** I'm sorry, i know, my english is bad, but i hope, you understand everything! *** Anzelm Link to comment Share on other sites More sharing options...
LuSoeGyi Posted August 3, 2015 Share Posted August 3, 2015 Try this#Include <WinAPI.au3> GuiCreate("",500,500) GuiSetState() _WinAPI_ShowCursor(False) Sleep(5000) _WinAPI_ShowCursor(True) Sleep(5000) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now