Hallo ich habe mir ein AuswahlMenü gebaut,
leider wird wenn es gestartet wird immer die letzte Seite (Button2)
angezeigt. Und nicht die Erste Seite (Button 1)
Erst wenn ich mit den Maustaste über die Checkboxen drüberfahre
sieht man den Text von Button 1.
Ist es möglich das Menü beim Aufruf sofort mit der Button 1 Seite zu starten.
(Button 1 -> Hide, Alle Checkboxen und Icons von 1 - 10 sichtbar)
Vielen Dank
[Blockierte Grafik: http://www.xtupload.com/new/image-C26B_49D8A7B3.jpg]
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Menu = GUICreate("DEMO-MENÜ by XTC99", 322, 243, -1, -1)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 64, 40, 90, 17)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 64, 80, 90, 17)
$Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 64, 120, 90, 17)
$Checkbox4 = GUICtrlCreateCheckbox("Checkbox4", 64, 160, 90, 17)
$Checkbox5 = GUICtrlCreateCheckbox("Checkbox5", 64, 200, 90, 17)
$Checkbox6 = GUICtrlCreateCheckbox("Checkbox6", 224, 40, 90, 17)
$Checkbox7 = GUICtrlCreateCheckbox("Checkbox7", 224, 80, 90, 17)
$Checkbox8 = GUICtrlCreateCheckbox("Checkbox8", 224, 120, 90, 17)
$Checkbox9 = GUICtrlCreateCheckbox("Checkbox9", 224, 160, 90, 17)
$Checkbox10 = GUICtrlCreateCheckbox("Checkbox10", 224, 200, 90, 17)
$Icon1 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -47, 16, 32, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon2 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -16, 16, 72, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon3 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -22, 16, 112, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon4 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -87, 16, 152, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon5 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -117, 16, 192, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon6 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -93, 176, 32, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon7 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -105, 176, 72, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon8 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -62, 176, 112, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon9 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -66, 176, 152, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon10 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -112, 176, 192, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Checkbox11 = GUICtrlCreateCheckbox("Checkbox11", 64, 40, 90, 17)
$Checkbox12 = GUICtrlCreateCheckbox("Checkbox12", 64, 80, 90, 17)
$Checkbox13 = GUICtrlCreateCheckbox("Checkbox13", 64, 120, 90, 17)
$Checkbox14 = GUICtrlCreateCheckbox("Checkbox14", 64, 160, 90, 17)
$Checkbox15 = GUICtrlCreateCheckbox("Checkbox15", 64, 200, 90, 17)
$Checkbox16 = GUICtrlCreateCheckbox("Checkbox16", 224, 40, 90, 17)
$Checkbox17 = GUICtrlCreateCheckbox("Checkbox17", 224, 80, 90, 17)
$Checkbox18 = GUICtrlCreateCheckbox("Checkbox18", 224, 120, 90, 17)
$Checkbox19 = GUICtrlCreateCheckbox("Checkbox19", 224, 160, 90, 17)
$Checkbox20 = GUICtrlCreateCheckbox("Checkbox20", 224, 200, 90, 17)
$Icon11 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -57, 16, 32, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon12 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -26, 16, 72, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon13 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -32, 16, 112, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon14 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -97, 16, 152, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon15 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -127, 16, 192, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon16 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -113, 176, 32, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon17 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -115, 176, 72, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon18 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -72, 176, 112, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon19 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -76, 176, 152, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Icon20 = GUICtrlCreateIcon(@SystemDir & "\shell32.dll", -122, 176, 192, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP))
$Button1 = GUICtrlCreateButton("Button 1", 40, 8, 84, 17, 0)
$Button2 = GUICtrlCreateButton("Button 2", 176, 8, 84, 17, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
For $i = $Checkbox1 To $Checkbox20
GUICtrlSetState($i, $GUI_Hide)
Next
For $i = $Icon1 To $Icon20
GUICtrlSetState($i, $GUI_Hide)
Next
GUICtrlSetState($Button1, $GUI_Disable)
GUICtrlSetState($Button2, $GUI_Enable)
For $i = $Checkbox1 To $Checkbox10
GUICtrlSetState($i, $GUI_SHOW)
Next
For $i = $Icon1 To $Icon10
GUICtrlSetState($i, $GUI_SHOW)
Next
Case $Button2
For $i = $Checkbox1 To $Checkbox20
GUICtrlSetState($i, $GUI_Hide)
Next
For $i = $Icon1 To $Icon20
GUICtrlSetState($i, $GUI_Hide)
Next
GUICtrlSetState($Button1, $GUI_Enable)
GUICtrlSetState($Button2, $GUI_Disable)
For $i = $Checkbox11 To $Checkbox20
GUICtrlSetState($i, $GUI_SHOW)
Next
For $i = $Icon11 To $Icon20
GUICtrlSetState($i, $GUI_SHOW)
Next
EndSwitch
WEnd