ich nochmal.. ist etwas älter aber gut.
hab bisschen rumexperimentiert und die perfekte methode gefunden wie man gut hovereffekte macht die keinen fehler erzeugen wenn man schnell über mehrere controls "hovert"
[autoit]; GUI
[/autoit][autoit][/autoit][autoit]$GUI = GuiCreate("Hover the controls!", 480, 220)
[/autoit][autoit][/autoit][autoit]$Button = GuiCtrlCreateButton("Button", 30, 60, 100, 30)
$Label = GuiCtrlCreateLabel("Label", 90, 20, 80, 20)
GUICtrlSetCursor(-1, 0)
GUICtrlSetFont(-1, 14, -1, 0, "Arial")
$Edit = GuiCtrlCreateEdit("I like yellow...", 220, 30, 160, 80)
$Icon = GuiCtrlCreateIcon("shell32.dll", 7, 120, 110, 32, 32)
GuiSetState()
[/autoit][autoit][/autoit][autoit]; Hover Functions
[/autoit][autoit][/autoit][autoit]Func Hover($ID)
Switch $ID
Case $Button
GUICtrlSetData($ID, "Don't press!")
Case $Label
GUICtrlSetFont($ID, 14, 800, 0, "Arial")
Case $Edit
GUICtrlSetBkColor($ID, 0xFFFF00)
Case $Icon
GUICtrlSetImage($ID, "shell32.dll", 10)
Beep(500, 50) ; for demonstration
EndSwitch
EndFunc
Func Normal($ID)
Switch $ID
Case $Button
GUICtrlSetData($ID, "Button")
Case $Label
GUICtrlSetFont($ID, 14, -1, 0, "Arial")
Case $Edit
GUICtrlSetBkColor($ID, -1)
Case $Icon
GUICtrlSetImage($ID, "shell32.dll", 7)
EndSwitch
EndFunc
; Main While
[/autoit][autoit][/autoit][autoit]$Hover_Old = ""
[/autoit][autoit][/autoit][autoit]While 1
[/autoit][autoit][/autoit][autoit]If GUIGetMsg() = -3 Then Exit
[/autoit][autoit][/autoit][autoit]$Cursor = GUIGetCursorInfo($GUI) ; it's important that the gui variable is setted in this function!
If $Cursor[4] <> $Hover_Old Then
Normal($Hover_Old) ; reset the previous control
Hover($Cursor[4]) ; set the new control hovered
$Hover_Old = $Cursor[4]
EndIf
WEnd
[/autoit][autoit][/autoit][autoit];
;
;
mfg