Hi Leute
Ich wollt für mein Program ein Rating mit Sternen machen, nur weis ich nicht wie ich das Flackern weg bekomme weil ich die Bilder jedes mal lösche und wieder einfüge
Wenn es bessere Realisationsvorschlage gibt immer her damit
Spoiler anzeigen
#include <GuiConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]$GUI = GUICreate("", 500, 500)
Dim $Button[6]
$Button[1] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 50, 100, 50, 50)
$Button[2] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 100, 100, 50, 50)
$Button[3] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 150, 100, 50, 50)
$Button[4] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 200, 100, 50, 50)
$Button[5] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 250, 100, 50, 50)
GUISetState(@SW_SHOW)
;############### LOOP ###############
While 1
$Mouseover = GUIGetCursorInfo($GUI)
If $Mouseover[4] = $Button[1] Then
GUICtrlDelete($Button[2])
GUICtrlDelete($Button[3])
GUICtrlDelete($Button[4])
GUICtrlDelete($Button[5])
$Button[2] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 100, 100, 50, 50)
$Button[3] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 150, 100, 50, 50)
$Button[4] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 200, 100, 50, 50)
$Button[5] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 250, 100, 50, 50)
$Zahl = 1
EndIf
If $Mouseover[4] = $Button[2] Then
GUICtrlDelete($Button[2])
GUICtrlDelete($Button[3])
GUICtrlDelete($Button[4])
GUICtrlDelete($Button[5])
$Button[2] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 100, 100, 50, 50)
$Button[3] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 150, 100, 50, 50)
$Button[4] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 200, 100, 50, 50)
$Button[5] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 250, 100, 50, 50)
EndIf
If $Mouseover[4] = $Button[3] Then
GUICtrlDelete($Button[2])
GUICtrlDelete($Button[3])
GUICtrlDelete($Button[4])
GUICtrlDelete($Button[5])
$Button[2] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 100, 100, 50, 50)
$Button[3] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 150, 100, 50, 50)
$Button[4] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 200, 100, 50, 50)
$Button[5] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 250, 100, 50, 50)
EndIf
If $Mouseover[4] = $Button[4] Then
GUICtrlDelete($Button[2])
GUICtrlDelete($Button[3])
GUICtrlDelete($Button[4])
GUICtrlDelete($Button[5])
$Button[2] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 100, 100, 50, 50)
$Button[3] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 150, 100, 50, 50)
$Button[4] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 200, 100, 50, 50)
$Button[5] = GUICtrlCreatePic(@ScriptDir & "\empty.gif", 250, 100, 50, 50)
EndIf
If $Mouseover[4] = $Button[5] Then
GUICtrlDelete($Button[2])
GUICtrlDelete($Button[3])
GUICtrlDelete($Button[4])
GUICtrlDelete($Button[5])
$Button[2] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 100, 100, 50, 50)
$Button[3] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 150, 100, 50, 50)
$Button[4] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 200, 100, 50, 50)
$Button[5] = GUICtrlCreatePic(@ScriptDir & "\full.gif", 250, 100, 50, 50)
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Danke schon mal im vorraus
Keyle