Hallo,
ich bin wirklich fast am verzweifeln mit meinen MouseOver-Problemen.
Es klappt einfach nicht zufriedenstellend.
Hier mal wieder Code....
Zuerst die Funktion:
[autoit]
$hover = 0
Func _mover($control, $bild1, $bild2)
$mpos = GUIGetCursorInfo($Gui_Main)
If (IsArray($mpos)) Then
If ($mpos[4] = $control) Then
;MsgBox(4,"","")
GUICtrlSetImage($control, $bild2)
$hover = 1
Elseif ($mpos[4] <> $control and $hover = 1) Then
GUICtrlSetImage($control, $bild1)
$hover = 0
EndIf
EndIf
EndFunc
[/autoit]dann das Script
[autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include "_mover.au3"
#Include <Array.au3>
$Gui_Main = GUICreate("Gui_Main", 405, 400, 302, 218)
$IconKat1Off = GUICtrlCreateIcon("icon01.ico", -1, 48, 108, 219, 52)
$IconKat2Off = GUICtrlCreateIcon("icon01.ico", -1, 48, 164, 219, 52)
$IconKat3Off = GUICtrlCreateIcon("icon01.ico", -1, 48, 220, 219, 52)
$IconKat4Off = GUICtrlCreateIcon("icon01.ico", -1, 48, 280, 219, 52)
$IconEndeoff = GUICtrlCreateIcon("iconEndeoff.ico", -1, 572, 36, 48, 48)
GUISetState(@SW_SHOW)
$Bild1 = @ScriptDir & "\Icon01.ico"
$Bild2 = @ScriptDir & "\icon02.ico"
$Bild3 = @ScriptDir & "\icon03.ico"
While 1
$nMsg = GUIGetMsg()
_mover($IconKat1Off, $Bild1,$Bild2)
_mover($IconKat2Off, $Bild1,$Bild2)
_mover($IconKat3Off, $Bild1,$Bild2)
_mover($IconKat4Off, $Bild1,$Bild2)
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
die Buttons werden nicht korrekt ausgeschaltet,
zittern...
Sieht so aus:
[attach=12070,'none','2']
Liebe Grüße
Ilse ![]()