Jump to content
Sign in to follow this  
ZibbZ

Mouse Cursor

Recommended Posts

ZibbZ

Hi, can anyone tell me how to create a moving mouse cursor. I already made like 5 cursors, but i would like to have a moving one. For example (Spelling out my nickname) Z then cursor say i-b-b then again Z and the last one finish the whole Name. Letter by letter, and then the whole word.

Plus, how can I put mouse cursors for you to download?


[font="Optima"]ZibbZ[/font]

Share this post


Link to post
Share on other sites
Holger

Better post next item in support forum.

Here is a small example:

#include <GUIConstants.au3>
GLobal $GCL_HCURSOR = -12

$hGui = GUICreate("test")
GUISetState()

LoadCursor("C:\WINDOWS\Cursors\dinosaur.ani")

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd

Exit

Func LoadCursor($szFileName)
    $hCursor = DllCall("user32.dll", "hwnd", "LoadCursorFromFile", "str", $szFileName)
    $hCursor = $hCursor[0]
    If $hCursor <> 0 Then DllCall("user32.dll", "hwnd", "SetClassLong", "hwnd", $hGui, "int", $GCL_HCURSOR, "hwnd", $hCursor)
EndFunc

Regards :whistle:

Holger

Edit: fixed msgbox :dance:

Edit: cut out first SetCursor -> not needed

Edited by Holger

Share this post


Link to post
Share on other sites
layer

Haha, never knew you could do that, very cool Holger :whistle:


FootbaG

Share this post


Link to post
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
Sign in to follow this  

×