Jump to content

Recommended Posts

Posted

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]
Posted (edited)

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...