Jump to content

How to change the default cursor


 Share

Recommended Posts

Hello

I'm trying to set a new cursor instead of the default cursors of the system

ex: make the default arrow cursor is busy until a program starts

I've searched the forum and got this code

Global Const $OCR_APPSTARTING = 32650
Global Const $OCR_NORMAL = 32512
Global Const $OCR_CROSS = 32515
Global Const $OCR_HAND = 32649
Global Const $OCR_IBEAM = 32513
Global Const $OCR_NO = 32648
Global Const $OCR_SIZEALL = 32646
Global Const $OCR_SIZENESW = 32643
Global Const $OCR_SIZENS = 32645
Global Const $OCR_SIZENWSE = 32642
Global Const $OCR_SIZEWE = 32644
Global Const $OCR_UP = 32516
Global Const $OCR_WAIT = 32514


_SetCursor(@WindowsDir&"\cursors\aero_working.ani", $OCR_NORMAL)


Func _SetCursor($s_file, $i_cursor)
Local $newhcurs
$newhcurs = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $s_file)
DllCall("user32.dll", "int", "SetSystemCursor", "int", $newhcurs[0], "int", $i_cursor)
DllCall("user32.dll", "int", "DestroyCursor", "int", $newhcurs[0])
EndFunc

 

this code is good in changing the cursor from an external file

but can I change the cursor without using external files ( as in win XP there're no files for default cursors)

ex: change default system Normal arrow to AppStarting arrow directly

 

Thank you and Any help is very appreciated,

Edited by MAS
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...