oder so:
Spoiler anzeigen
#include<GUIConstantsEx.au3>
#include<StaticConstants.au3>
Global $picBasic = 'C:\WINDOWS\system32\oobe\images\'
Global $pic1 = 'nextover.jpg', $pic2 = 'nextup.jpg'
$gui = GUICreate("Test",Default,Default,-1,-1)
$btn = GUICtrlCreatePic($picBasic & $pic1, 30, 40, 24, 24, $SS_BLACKRECT)
GUISetState()
Do
$msg = GUIGetMsg()
$aCursorInfo = GUIGetCursorInfo()
Select
Case $aCursorInfo[2] = 1 And $aCursorInfo[4] = $btn
_AnimButton($gui, $btn, $picBasic & $pic1, $picBasic & $pic2)
; Code
Case Else
;;
EndSelect
Until $msg = $GUI_EVENT_CLOSE
Func _AnimButton($IDgui, ByRef $IDbtn, $picUP, $picDOWN, $delay=150)
Local $pos = ControlGetPos($IDgui, '', $IDbtn)
GUICtrlDelete($IDbtn)
Local $tmpBtn = GUICtrlCreatePic($picDOWN, $pos[0], $pos[1]+1, $pos[2]-1, $pos[3]-1)
Sleep($delay)
GUICtrlDelete($tmpBtn)
$IDbtn = GUICtrlCreatePic($picUP, $pos[0], $pos[1], $pos[2], $pos[3])
EndFunc