markaberes Problem mit Case

  • habe ein richtig komisches Problem, ist bestimmt ganz simpel...
    wenn ich unter allgemein auf Faktor der Notenbereiche klicke soll ne msgbox kommen, das passiert auch...
    aber wenn ich jetz unter Update auf Update suchen klicke kommt diese msgbox auch, obwohl ich doch mir extra die arbeit gemacht habe und jede variable umbenannt habe:-(

    hier das Skript:

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: myName

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Template AutoIt script.

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    ; Script Start - Add your code below here
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <StaticConstants.au3>
    #include <TreeViewConstants.au3>
    #include <WindowsConstants.au3>
    Global $Form6_Icon1
    Global $Form6 = GUICreate("Extras", 573, 344, 791, 473)
    Global $Button1 = GUICtrlCreateButton("&OK", 332, 314, 75, 25, $WS_GROUP)
    Global $Button4 = GUICtrlCreateButton("&Übernehmen", 412, 314, 75, 25, $WS_GROUP)
    Global $Button2 = GUICtrlCreateButton("&Abbrechen", 492, 314, 75, 25, $WS_GROUP)
    Global $TreeView1 = GUICtrlCreateTreeView(18, 15, 133, 190)
    Global $TreeView1_0 = GUICtrlCreateTreeViewItem("Allgemein", $TreeView1)
    Global $TreeView1_1 = GUICtrlCreateTreeViewItem("Update", $TreeView1)
    Global $TreeView1_2 = GUICtrlCreateTreeViewItem("Import/Export", $TreeView1)
    Global $TreeView1_3 = GUICtrlCreateTreeViewItem("Erscheinungsbild", $TreeView1)
    Global $TreeView1_4 = GUICtrlCreateTreeViewItem("Passwort", $TreeView1)
    ;Global $TreeView1_5 = GUICtrlCreateTreeViewItem("Sonstiges", $TreeView1)
    Global $Topic = GUICtrlCreateLabel("Allgemein", 156, 9, 412, 24, $SS_CENTER)
    GUICtrlSetFont(-1, 12, 400, 4, "MS Reference Sans Serif")
    _allgemeinshow()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Form6_Group2_Label1
    MsgBox(0, "", "hilfedatei mit faktor")
    Case $TreeView1_0
    _allgemeinhide()
    _updatehide()
    _importexporthide()
    _passworthide()
    _erscheinungsbildhide()
    _allgemeinshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Allgemein")
    Case $TreeView1_1
    _allgemeinhide()
    _updatehide()
    _passworthide()
    _importexporthide()
    _erscheinungsbildhide()
    _updateshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Update")
    Case $TreeView1_2
    _allgemeinhide()
    _updatehide()
    _passworthide()
    _importexporthide()
    _erscheinungsbildhide()
    _importexportshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Import/Export")
    Case $TreeView1_3
    _allgemeinhide()
    _updatehide()
    _importexporthide()
    _passworthide()
    _erscheinungsbildhide()
    _erscheinungsbildshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Erscheinungsbild")
    Case $TreeView1_4
    _allgemeinhide()
    _updatehide()
    _importexporthide()
    _passworthide()
    _erscheinungsbildhide()
    _passwortshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Passwort")

    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func _allgemeinshow()
    Global $Form6_Group1 = GUICtrlCreateGroup("Fenster", 183, 42, 286, 85)
    Global $Form6_Group1_Label1 = GUICtrlCreateLabel("Transparenz", 198, 63, 63, 17)
    Global $Form6_Group1_Slider1 = GUICtrlCreateSlider(264, 60, 163, 22)
    GUICtrlSetLimit(-1, 255, 0)
    Global $Form6_Group1_Label2 = GUICtrlCreateLabel("Fenstertitel", 198, 93, 55, 17)
    Global $Form6_Group1_Input1 = GUICtrlCreateInput("%version%", 270, 90, 151, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group2 = GUICtrlCreateGroup("Berechnung", 183, 135, 280, 151)
    Global $Form6_Group2_Label1 = GUICtrlCreateLabel("Faktor der Notenbereiche", 201, 156, 125, 17)
    GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetCursor (-1, 4)
    Global $Form6_Group2_Label2 = GUICtrlCreateLabel("Schulaufgaben", 216, 186, 76, 17)
    Global $Form6_Group2_Label3 = GUICtrlCreateLabel("Extemporalen", 216, 210, 68, 17)
    Global $Form6_Group2_Label4 = GUICtrlCreateLabel("Sonstige Noten", 216, 234, 77, 17)
    Global $Form6_Group2_Input1 = GUICtrlCreateInput("2", 309, 183, 28, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
    Global $Form6_Group2_Input2 = GUICtrlCreateInput("1", 309, 207, 28, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
    Global $Form6_Group2_Input3 = GUICtrlCreateInput("1", 309, 231, 28, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUICtrlSetCursor (-1, 7)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\configure.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY,$WS_GROUP))
    EndFunc
    Func _allgemeinhide()
    GUICtrlDelete($Form6_Group1)
    GUICtrlDelete($Form6_Group1_Label1)
    GUICtrlDelete($Form6_Group1_Slider1)
    GUICtrlDelete($Form6_Group1_Label2)
    GUICtrlDelete($Form6_Group1_Input1)
    GUICtrlDelete($Form6_Group2)
    GUICtrlDelete($Form6_Group2_Label1)
    GUICtrlDelete($Form6_Group2_Label2)
    GUICtrlDelete($Form6_Group2_Label3)
    GUICtrlDelete($Form6_Group2_Label4)
    GUICtrlDelete($Form6_Group2_Input1)
    GUICtrlDelete($Form6_Group2_Input2)
    GUICtrlDelete($Form6_Group2_Input3)
    GUICtrlDelete($Form6_Icon1)
    EndFunc
    Func _updateshow()
    Global $Form6_Group3 = GUICtrlCreateGroup("Einstellungen", 159, 42, 325, 109)
    Global $Form6_Group3_Checkbox1 = GUICtrlCreateCheckbox("automatisch nach Updates suchen", 171, 81, 193, 19)
    Global $Form6_Group3_Radio1 = GUICtrlCreateRadio("Bei Programmstart", 189, 99, 109, 19)
    Global $Form6_Group3_Radio2 = GUICtrlCreateRadio("Bei Windowsstart", 189, 120, 103, 13)
    Global $Form6_Group3_Checkbox2 = GUICtrlCreateCheckbox("Änderungen anzeigen", 171, 63, 121, 16)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group3_Button3 = GUICtrlCreateButton("nach Update suchen:", 162, 180, 124, 22, $WS_GROUP)
    Global $Form6_Group3_Label2 = GUICtrlCreateLabel("Es wurde eine neue Version gefunden!", 303, 183, 187, 17)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\webexport.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY,$WS_GROUP))
    EndFunc
    Func _updatehide()
    Global $Form6_Group3, $Form6_Group3_Checkbox1, $Form6_Group3_Checkbox2, $Form6_Group3_Radio2, $Form6_Group3_Button3,$Form6_Group3_Label2
    GUICtrlDelete($Form6_Group3)
    GUICtrlDelete($Form6_Group3_Checkbox1)
    GUICtrlDelete($Form6_Group3_Checkbox1)
    GUICtrlDelete($Form6_Group3_Radio2)
    GUICtrlDelete($Form6_Group3_Checkbox2)
    GUICtrlDelete($Form6_Group3_Button3)
    GUICtrlDelete($Form6_Group3_Label2)
    GUICtrlDelete($Form6_Icon1)
    EndFunc
    Func _importexportshow()
    Global $Form6_Group4 = GUICtrlCreateGroup("Datensicherung", 162, 39, 400, 127)
    Global $Form6_Group4_Label1 = GUICtrlCreateLabel("Benutzer", 183, 63, 46, 17)
    Global $Form6_Group4_List1 = GUICtrlCreateList("", 168, 81, 94, 71)
    Global $Form6_Group4_List2 = GUICtrlCreateList("", 306, 81, 94, 71, BitOR($LBS_SORT,$LBS_MULTIPLESEL,$WS_BORDER))
    Global $Form6_Group4_Label2 = GUICtrlCreateLabel("Jahrgang", 327, 63, 48, 17)
    Global $Form6_Group4_Button1 = GUICtrlCreateButton("->", 270, 105, 25, 25, $WS_GROUP)
    Global $Form6_Group4_Button2 = GUICtrlCreateButton("Sichern", 417, 111, 67, 22, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group5 = GUICtrlCreateGroup("Daten Import", 162, 168, 400, 139)
    Global $Form6_Group5_Input1 = GUICtrlCreateInput("C:\Program Files\", 174, 186, 277, 21)
    Global $Form6_Group5_Button1 = GUICtrlCreateButton("Durchsuchen", 462, 186, 88, 19, $WS_GROUP)
    Global $Form6_Group5_Label1 = GUICtrlCreateLabel("Bitte den zu imporierenden Jahrgang wählen (auch mehr auswählbar)", 174, 210, 329, 17)
    Global $Form6_Group5_List1 = GUICtrlCreateList("", 174, 231, 94, 71, BitOR($LBS_SORT,$LBS_MULTIPLESEL,$WS_BORDER))
    Global $Form6_Group5_Button2 = GUICtrlCreateButton("Import", 486, 282, 64, 19, $WS_GROUP)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\editpaste.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY,$WS_GROUP))

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc
    func _importexporthide()
    Global $Form6_Group4,$Form6_Group4_Label1,$Form6_Group4_List1,$Form6_Group4_List2,$Form6_Group4_Label2,$Form6_Group4_Button1,$Form6_Group4_Button2,$Form6_Group5,$Form6_Group5_Input1,$Form6_Group5_Button1,$Form6_Group5_Label1,$Form6_Group5_List1,$Form6_Group5_Button2
    GUICtrlDelete($Form6_Group4)
    GUICtrlDelete($Form6_Group4_Label1)
    GUICtrlDelete($Form6_Group4_List1)
    GUICtrlDelete($Form6_Group4_List2)
    GUICtrlDelete($Form6_Group4_Label2)
    GUICtrlDelete($Form6_Group4_Button1)
    GUICtrlDelete($Form6_Group4_Button2)
    GUICtrlDelete($Form6_Group5)
    GUICtrlDelete($Form6_Group5_Input1)
    GUICtrlDelete($Form6_Group5_Button1)
    GUICtrlDelete($Form6_Group5_Label1)
    GUICtrlDelete($Form6_Group5_List1)
    GUICtrlDelete($Form6_Group5_Button2)
    GUICtrlDelete($Form6_Icon1)
    EndFunc
    Func _erscheinungsbildshow()
    Global $Form6_Group6 = GUICtrlCreateGroup("Vordefinierte Hintergrundfarben", 162, 42, 187, 79)
    Global $Form6_Group6_Button1 = GUICtrlCreateButton("Blau", 171, 69, 76, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $Form6_Group6_Button2 = GUICtrlCreateButton("Grün", 261, 69, 67, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xC0DCC0)
    Global $Form6_Group6_Button3 = GUICtrlCreateButton("Creme", 171, 90, 76, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xFFFBF0)
    Global $Form6_Group6_Button4 = GUICtrlCreateButton("Grau", 261, 90, 67, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xBFCDDB)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group7 = GUICtrlCreateGroup("Farben wählen", 162, 129, 172, 112)
    Global $Form6_Group7_Button1 = GUICtrlCreateButton("Hintergrundfarbe wählen", 171, 147, 130, 22, $WS_GROUP)
    Global $Form6_Group7_Button2 = GUICtrlCreateButton("Schriftfarbe wählen", 171, 171, 130, 22, $WS_GROUP)
    Global $Form6_Group7_Button3 = GUICtrlCreateButton("Linkfarbe wählen", 171, 195, 130, 22, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group8 = GUICtrlCreateGroup("So sieht es aus", 351, 126, 193, 115)
    Global $Form6_Group8_Graphic1 = GUICtrlCreateGraphic(354, 138, 187, 100)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $Form6_Group8_Label1 = GUICtrlCreateLabel("Testschriftart", 369, 150, 65, 17)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $Form6_Group8_Label2 = GUICtrlCreateLabel("Textlink", 375, 180, 49, 17)
    GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    GUICtrlSetCursor (-1, 0)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\appearance.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY,$WS_GROUP))

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc
    Func _erscheinungsbildhide()
    Global $Form6_Group6, $Form6_Group6_Button1,$Form6_Group6_Button2,$Form6_Group6_Button3,$Form6_Group6_Button4,$Form6_Group7,$Form6_Group7_Button1,$Form6_Group7_Button2,$Form6_Group7_Button3,$Form6_Group8,$Form6_Group8_Graphic1
    Global $Form6_Group8_Label1,$Form6_Group8_Label2
    GUICtrlDelete($Form6_Group6)
    GUICtrlDelete($Form6_Group6_Button1)
    GUICtrlDelete($Form6_Group6_Button2)
    GUICtrlDelete($Form6_Group6_Button3)
    GUICtrlDelete($Form6_Group6_Button4)
    GUICtrlDelete($Form6_Group7)
    GUICtrlDelete($Form6_Group7_Button1)
    GUICtrlDelete($Form6_Group7_Button2)
    GUICtrlDelete($Form6_Group7_Button3)
    GUICtrlDelete($Form6_Group8)
    GUICtrlDelete($Form6_Group8_Graphic1)
    GUICtrlDelete($Form6_Group8_Label1)
    GUICtrlDelete($Form6_Group8_Label2)
    GUICtrlDelete($Form6_Icon1)

    EndFunc
    Func _passwortshow()
    Global $Form6_Group9 = GUICtrlCreateGroup("neues Passwort", 165, 42, 367, 199)
    Global $Form6_Group9_Label1 = GUICtrlCreateLabel("Benutzer:", 186, 60, 49, 17)
    Global $Form6_Group9_Combo1 = GUICtrlCreateCombo("Bitte wählen", 246, 57, 106, 25)
    Global $Form6_Group9_Label2 = GUICtrlCreateLabel("Passwort", 189, 87, 47, 17)
    Global $Form6_Group9_Input1 = GUICtrlCreateInput("", 246, 84, 133, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
    Global $Form6_Group9_Input2 = GUICtrlCreateInput("", 246, 108, 133, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
    Global $Form6_Group9_Label3 = GUICtrlCreateLabel("wiederholen", 174, 111, 61, 17)
    Global $Form6_Group9_Label4 = GUICtrlCreateLabel("Sicherheitsfrage", 171, 135, 80, 17)
    Global $Form6_Group9_Input2 = GUICtrlCreateInput("Anwort", 264, 159, 190, 21)
    Global $Form6_Group9_input3 = GUICtrlCreateInput("Frage stellen, z.b. Mein Lieblingsspiel?", 264, 135, 190, 21)
    Global $Form6_Group9_Button1 = GUICtrlCreateButton("Erstellen", 435, 204, 73, 22, $WS_GROUP)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\personal.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    EndFunc
    func _passworthide()
    Global $Form6_Group9 ,$Form6_Group9_Label1 ,$Form6_Group9_Combo1 , $Form6_Group9_Label2, $Form6_Group9_Input1, $Form6_Group9_Input2,$Form6_Group9_Label3 , $Form6_Group9_Label4, $Form6_Group9_Input2, $Form6_Group9_Button1, $Form6_Group9_input3
    GUICtrlDelete($Form6_Group9)
    GUICtrlDelete($Form6_Group9_Label1)
    GUICtrlDelete($Form6_Group9_Combo1)
    GUICtrlDelete($Form6_Group9_Label2)
    GUICtrlDelete($Form6_Group9_Input1)
    GUICtrlDelete($Form6_Group9_Input2)
    GUICtrlDelete($Form6_Group9_Label3)
    GUICtrlDelete($Form6_Group9_Label4)
    GUICtrlDelete($Form6_Group9_Input2)
    GUICtrlDelete($Form6_Group9_Button1)
    GUICtrlDelete($Form6_Group9_input3)
    EndFunc

    [/autoit]

    hoffe es kann jemand helfen

    • Offizieller Beitrag

    Ich würde dir raten die Controls nur zu verstecken. Wenn du GuiCtrlDelete aufrufst wird das Contrl gelöscht und die ControlID wieder neu vergeben. Im Augenblick ist dein Script das absolute Chaos.
    Arbeite lieber mit mehreren Guis und verstecke Sie nach dem erstellen, bei Bedarf einblenden. Dann werden dir ControlID´s nicht ständig neu vergeben.

    Edit Ich meinte eher, erstelle alle Controls und verstecke Sie nach dem erstellen. Bei Bedarf einfach wieder einblenden. So werden die ControlID´S nicht ständig neu vergeben.

  • naja was heißt chaos...das ist doch total übersichtlich...
    macht doch eigentlich kein unterschied das mit delete oder hide zu machen...

    • Offizieller Beitrag

    Doch, das macht es, die ControlID´s werden ständig neu vergeben.
    Kannst du mal testen, indem du diese Zeilen in deine Case einfügst:

    [autoit]

    Case $Form6_Group2_Label1
    MsgBox(0, "ControlID", $Form6_Group2_Label)

    [/autoit]

    Du hast keine feste Zuordnung und so ist dein Script anfällig für Fehler.

    Wenn du das Script compilierts bekommst du dann diese Meldung:
    C:\Users\MICHAEL\Desktop\s.au3(43,30) : WARNING: $Form6_Group2_Label1: possibly used before declaration.

  • Hi;

    Zitat

    Wenn du GuiCtrlDelete aufrufst wird das Contrl gelöscht und die ControlID wieder neu vergeben

    Genau so ist es.
    @Reaker
    Jede Wette, ich halte dein Programm irgendwo an und frage dich dann, welche ConrolID welchem Button zugeordnet ist, das weiss zu dem Zeitpunkt weder du noch dein Script so genau.
    Was ich überhaupt nicht verstehe, warum du dieses Chaos überhaupt veranstaltest. GUI´s und Controls erstellen, und je nach Anforderung sichtbar/unsichtbar machen....

    Zitat

    naja was heißt chaos...das ist doch total übersichtlich...

    made my day^^ wenn das so übersichtlich ist, wieso findest du den Fehler dann nicht sofort?!
    ciao
    Andy

  • 'Hallo Reaker,

    kann mich den vorhergehenden Posts nur anschliessen, es ist sinnvoller die Controlls nicht zu löschen stattdessen solltest du sie nur zu verstecken. Das Chaos mit der Zuordnung IMHO wird dadurch ausgelöst, dass du Varaiblen an verschiedenen Stellen global und dadurch auch mehrfach definierst. Z.B.: $Form6_Group3_Button3 ist in der Func _updateshow global definiert und auch in der Func _updatehide.
    Ich habe mir die Mühe gemacht dein Skript abzuändern. Ich lege die Controlls auf ChildGUIs und blende diese bei Bedarf ein bzw. aus.

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    AutoIt Version: 3.3.0.0
    Author: myName

    [/autoit] [autoit][/autoit] [autoit]

    Script Function:
    Template AutoIt script.

    [/autoit] [autoit][/autoit] [autoit]

    #ce ----------------------------------------------------------------------------

    [/autoit] [autoit][/autoit] [autoit]

    ; Script Start - Add your code below here
    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <StaticConstants.au3>
    #include <TreeViewConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars',1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGuiChild[6] ;HilfsGUIs
    Global $iaktChild = -999 ;zum Speichrn der zurzeit aktiven ChildGUI, -999 = keine aktiv

    [/autoit] [autoit][/autoit] [autoit]

    Global $Form6_Group2_Label1 = -999

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGuiMain_Icon1
    Global $hGuiMain = GUICreate("Extras", 573, 344); , 791, 473)
    Global $Button1 = GUICtrlCreateButton("&OK", 332, 314, 75, 25, $WS_GROUP)
    Global $Button4 = GUICtrlCreateButton("&Übernehmen", 412, 314, 75, 25, $WS_GROUP)
    Global $Button2 = GUICtrlCreateButton("&Abbrechen", 492, 314, 75, 25, $WS_GROUP)
    Global $TreeView1 = GUICtrlCreateTreeView(18, 15, 133, 190)
    Global $TreeView1_0 = GUICtrlCreateTreeViewItem("Allgemein", $TreeView1)
    Global $TreeView1_1 = GUICtrlCreateTreeViewItem("Update", $TreeView1)
    Global $TreeView1_2 = GUICtrlCreateTreeViewItem("Import/Export", $TreeView1)
    Global $TreeView1_3 = GUICtrlCreateTreeViewItem("Erscheinungsbild", $TreeView1)
    Global $TreeView1_4 = GUICtrlCreateTreeViewItem("Passwort", $TreeView1)
    ;Global $TreeView1_5 = GUICtrlCreateTreeViewItem("Sonstiges", $TreeView1)
    Global $Topic = GUICtrlCreateLabel("Allgemein", 156, 9, 412, 24, $SS_CENTER)
    GUICtrlSetFont(-1, 12, 400, 4, "MS Reference Sans Serif")

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To 5
    $hGuiChild[$i] = -999 ;= noch nicht erzeugt
    _CreateChild($i) ;ChildGuis werden erzeugt
    Next
    _allgemeinshow()
    GUISetState(@SW_SHOW, $hGuiMain)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #EndRegion ### END Koda GUI section ###
    While 1
    Local $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Form6_Group2_Label1
    MsgBox(0, "", "hilfedatei mit faktor")
    Case $TreeView1_0
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _allgemeinshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Allgemein")
    Case $TreeView1_1
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _updateshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Update")
    Case $TreeView1_2
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _importexportshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Import/Export")
    Case $TreeView1_3
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _erscheinungsbildshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Erscheinungsbild")
    Case $TreeView1_4
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _passwortshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Passwort")
    EndSwitch
    WEnd
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateChild($iChildNo)
    Switch $iChildNo
    Case 1
    _allgemeinshow()
    Case 2
    _updateshow()
    Case 3
    _importexportshow()
    Case 4
    _erscheinungsbildshow()
    Case 5
    _passwortshow()
    EndSwitch
    EndFunc ;==>_CreateChild

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _allgemeinshow()
    If $hGuiChild[1] < 0 Then
    $hGuiChild[1] = GUICreate("", 500, 300, 170, 38, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    GUISetBkColor(0xA6CFFF)
    ConsoleWrite("Allgemein wird erzeugt" & @CRLF)
    Global $Form6_Group1 = GUICtrlCreateGroup("Fenster", 183, 42, 286, 85)
    Global $Form6_Group1_Label1 = GUICtrlCreateLabel("Transparenz", 198, 63, 63, 17)
    Global $Form6_Group1_Slider1 = GUICtrlCreateSlider(264, 60, 163, 22)
    GUICtrlSetLimit(-1, 255, 0)
    Global $Form6_Group1_Label2 = GUICtrlCreateLabel("Fenstertitel", 198, 93, 55, 17)
    Global $Form6_Group1_Input1 = GUICtrlCreateInput("%version%", 270, 90, 151, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group2 = GUICtrlCreateGroup("Berechnung", 183, 135, 280, 151)
    Global $Form6_Group2_Label1 = GUICtrlCreateLabel("Faktor der Notenbereiche", 201, 156, 125, 17)
    GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetCursor(-1, 4)
    Global $Form6_Group2_Label2 = GUICtrlCreateLabel("Schulaufgaben", 216, 186, 76, 17)
    Global $Form6_Group2_Label3 = GUICtrlCreateLabel("Extemporalen", 216, 210, 68, 17)
    Global $Form6_Group2_Label4 = GUICtrlCreateLabel("Sonstige Noten", 216, 234, 77, 17)
    Global $Form6_Group2_Input1 = GUICtrlCreateInput("2", 309, 183, 28, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER))
    Global $Form6_Group2_Input2 = GUICtrlCreateInput("1", 309, 207, 28, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER))
    Global $Form6_Group2_Input3 = GUICtrlCreateInput("1", 309, 231, 28, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER))
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUICtrlSetCursor(-1, 7)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\configure.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Allgemein wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[1])
    EndIf
    $iaktChild = 1
    EndFunc ;==>_allgemeinshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _allgemeinhide()
    GUISetState(@SW_HIDE, $hGuiChild[1])
    ConsoleWrite("Allgemein wird versteckt" & @CRLF)
    EndFunc ;==>_allgemeinhide
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    Func _updateshow()
    If $hGuiChild[2] < 0 Then
    $hGuiChild[2] = GUICreate("", 500, 300, 170, 38, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    GUISetBkColor(0xA6CFFF)
    ConsoleWrite("Update wird erzeugt" & @CRLF)
    Global $hGuiMain_Group3 = GUICtrlCreateGroup("Einstellungen", 159, 42, 325, 109)
    Global $hGuiMain_Group3_Checkbox1 = GUICtrlCreateCheckbox("automatisch nach Updates suchen", 171, 81, 193, 19)
    Global $hGuiMain_Group3_Radio1 = GUICtrlCreateRadio("Bei Programmstart", 189, 99, 109, 19)
    Global $hGuiMain_Group3_Radio2 = GUICtrlCreateRadio("Bei Windowsstart", 189, 120, 103, 13)
    Global $hGuiMain_Group3_Checkbox2 = GUICtrlCreateCheckbox("Änderungen anzeigen", 171, 63, 121, 16)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Group3_Button3 = GUICtrlCreateButton("nach Update suchen:", 162, 180, 124, 22, $WS_GROUP)
    Global $hGuiMain_Group3_Label2 = GUICtrlCreateLabel("Es wurde eine neue Version gefunden!", 303, 183, 187, 17)
    Global $hGuiMain_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\webexport.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Update wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[2])
    EndIf
    $iaktChild = 2; $hGuiChild[2]
    EndFunc ;==>_updateshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _updatehide()
    GUISetState(@SW_HIDE, $hGuiChild[2])
    ConsoleWrite("Update wird versteckt" & @CRLF)
    EndFunc ;==>_updatehide
    #ce
    Func _importexportshow()
    If $hGuiChild[3] < 0 Then
    $hGuiChild[3] = GUICreate("", 500, 300, 170, 38, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    GUISetBkColor(0xA6CFFF)
    ConsoleWrite("Import Export wird erzeugt" & @CRLF)
    Global $Form6_Group4 = GUICtrlCreateGroup("Datensicherung", 162, 39, 400, 127)
    Global $Form6_Group4_Label1 = GUICtrlCreateLabel("Benutzer", 183, 63, 46, 17)
    Global $Form6_Group4_List1 = GUICtrlCreateList("", 168, 81, 94, 71)
    Global $Form6_Group4_List2 = GUICtrlCreateList("", 306, 81, 94, 71, BitOR($LBS_SORT, $LBS_MULTIPLESEL, $WS_BORDER))
    Global $Form6_Group4_Label2 = GUICtrlCreateLabel("Jahrgang", 327, 63, 48, 17)
    Global $Form6_Group4_Button1 = GUICtrlCreateButton("->", 270, 105, 25, 25, $WS_GROUP)
    Global $Form6_Group4_Button2 = GUICtrlCreateButton("Sichern", 417, 111, 67, 22, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group5 = GUICtrlCreateGroup("Daten Import", 162, 168, 400, 139)
    Global $Form6_Group5_Input1 = GUICtrlCreateInput("C:\Program Files\", 174, 186, 277, 21)
    Global $Form6_Group5_Button1 = GUICtrlCreateButton("Durchsuchen", 462, 186, 88, 19, $WS_GROUP)
    Global $Form6_Group5_Label1 = GUICtrlCreateLabel("Bitte den zu imporierenden Jahrgang wählen (auch mehr auswählbar)", 174, 210, 329, 17)
    Global $Form6_Group5_List1 = GUICtrlCreateList("", 174, 231, 94, 71, BitOR($LBS_SORT, $LBS_MULTIPLESEL, $WS_BORDER))
    Global $Form6_Group5_Button2 = GUICtrlCreateButton("Import", 486, 282, 64, 19, $WS_GROUP)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\editpaste.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Import Export wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[3])
    EndIf
    $iaktChild = 3;

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_importexportshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _importexporthide()
    ConsoleWrite("Import Export wird angezeigt" & @CRLF)
    GUISetState(@SW_HIDE, $hGuiChild[3])
    EndFunc ;==>_importexporthide
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    Func _erscheinungsbildshow()
    If $hGuiChild[4] < 0 Then
    $hGuiChild[4] = GUICreate("", 500, 300, 170, 38, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    GUISetBkColor(0xA6CFFF)
    ConsoleWrite("Erscheinungsbild wird erzeugt" & @CRLF)
    Global $hGuiMain_Group6 = GUICtrlCreateGroup("Vordefinierte Hintergrundfarben", 162, 42, 187, 79)
    Global $hGuiMain_Group6_Button1 = GUICtrlCreateButton("Blau", 171, 69, 76, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $hGuiMain_Group6_Button2 = GUICtrlCreateButton("Grün", 261, 69, 67, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xC0DCC0)
    Global $hGuiMain_Group6_Button3 = GUICtrlCreateButton("Creme", 171, 90, 76, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xFFFBF0)
    Global $hGuiMain_Group6_Button4 = GUICtrlCreateButton("Grau", 261, 90, 67, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xBFCDDB)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Group7 = GUICtrlCreateGroup("Farben wählen", 162, 129, 172, 112)
    Global $hGuiMain_Group7_Button1 = GUICtrlCreateButton("Hintergrundfarbe wählen", 171, 147, 130, 22, $WS_GROUP)
    Global $hGuiMain_Group7_Button2 = GUICtrlCreateButton("Schriftfarbe wählen", 171, 171, 130, 22, $WS_GROUP)
    Global $hGuiMain_Group7_Button3 = GUICtrlCreateButton("Linkfarbe wählen", 171, 195, 130, 22, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Group8 = GUICtrlCreateGroup("So sieht es aus", 351, 126, 193, 115)
    Global $hGuiMain_Group8_Graphic1 = GUICtrlCreateGraphic(354, 138, 187, 100)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $hGuiMain_Group8_Label1 = GUICtrlCreateLabel("Testschriftart", 369, 150, 65, 17)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $hGuiMain_Group8_Label2 = GUICtrlCreateLabel("Textlink", 375, 180, 49, 17)
    GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\appearance.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Erscheinungsbild wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[4])
    EndIf
    $iaktChild = 4;
    EndFunc ;==>_erscheinungsbildshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _erscheinungsbildhide()
    ConsoleWrite("Erscheinungsbild wird versteckt" & @CRLF)
    GUISetState(@SW_HIDE, $hGuiChild[4])
    EndFunc ;==>_erscheinungsbildhide
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    Func _passwortshow()
    If $hGuiChild[5] < 0 Then
    $hGuiChild[5] = GUICreate("", 500, 300, 170, 38, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    GUISetBkColor(0xA6CFFF)
    ConsoleWrite("Passwort wird erzeugt" & @CRLF)
    Global $hGuiMain_Group9 = GUICtrlCreateGroup("neues Passwort", 165, 42, 367, 199)
    Global $hGuiMain_Group9_Label1 = GUICtrlCreateLabel("Benutzer:", 186, 60, 49, 17)
    Global $hGuiMain_Group9_Combo1 = GUICtrlCreateCombo("Bitte wählen", 246, 57, 106, 25)
    Global $hGuiMain_Group9_Label2 = GUICtrlCreateLabel("Passwort", 189, 87, 47, 17)
    Global $hGuiMain_Group9_Input1 = GUICtrlCreateInput("", 246, 84, 133, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
    Global $hGuiMain_Group9_Input2 = GUICtrlCreateInput("", 246, 108, 133, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
    Global $hGuiMain_Group9_Label3 = GUICtrlCreateLabel("wiederholen", 174, 111, 61, 17)
    Global $hGuiMain_Group9_Label4 = GUICtrlCreateLabel("Sicherheitsfrage", 171, 135, 80, 17)
    Global $hGuiMain_Group9_Input2 = GUICtrlCreateInput("Anwort", 264, 159, 190, 21)
    Global $hGuiMain_Group9_input3 = GUICtrlCreateInput("Frage stellen, z.b. Mein Lieblingsspiel?", 264, 135, 190, 21)
    Global $hGuiMain_Group9_Button1 = GUICtrlCreateButton("Erstellen", 435, 204, 73, 22, $WS_GROUP)
    Global $hGuiMain_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\personal.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Else
    ConsoleWrite("Passwort wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[5])
    EndIf
    $iaktChild = 5; $hGuiChild[5]
    EndFunc ;==>_passwortshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _passworthide()
    ConsoleWrite("Passwort wird versteckt" & @CRLF)
    GUISetState(@SW_HIDE, $hGuiChild[5])
    EndFunc ;==>_passworthide
    #ce

    [/autoit]

    Die Variable $Form6_Group2_Label1 habe ich bereits am Anfang global definiert, die anderen (die eine Aktion auslösen sollen) musst du noch deklarieren. Durch das platzieren der Controls auf ChildGUIs hat sich deren Position verändert, diese kannst du dir ja selbst anpassen,

    mfg (Auto)Bert

    • Offizieller Beitrag

    autoBert,
    warum hast du die Hintergrundfarben geändert und die Gui´s so komisch verschoben?
    Ich habe mal die Hintergrundfarbe wieder auf Standard gesetzt und die Positionen angepaßt.
    Sah irgendwie ein bischen zu verschoben aus. Sonst habe ich deinen Quellcode nicht verändert.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIListBox.au3>
    #include <StaticConstants.au3>
    #include <TreeViewConstants.au3>
    #include <WindowsConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars',1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGuiChild[6] ;HilfsGUIs
    Global $iaktChild = -999 ;zum Speichrn der zurzeit aktiven ChildGUI, -999 = keine aktiv

    [/autoit] [autoit][/autoit] [autoit]

    Global $Form6_Group2_Label1 = -999

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGuiMain_Icon1
    Global $hGuiMain = GUICreate("Extras", 573, 344)
    Global $Button1 = GUICtrlCreateButton("&OK", 332, 314, 75, 25, $WS_GROUP)
    Global $Button4 = GUICtrlCreateButton("&Übernehmen", 412, 314, 75, 25, $WS_GROUP)
    Global $Button2 = GUICtrlCreateButton("&Abbrechen", 492, 314, 75, 25, $WS_GROUP)
    Global $TreeView1 = GUICtrlCreateTreeView(18, 15, 133, 190)
    Global $TreeView1_0 = GUICtrlCreateTreeViewItem("Allgemein", $TreeView1)
    Global $TreeView1_1 = GUICtrlCreateTreeViewItem("Update", $TreeView1)
    Global $TreeView1_2 = GUICtrlCreateTreeViewItem("Import/Export", $TreeView1)
    Global $TreeView1_3 = GUICtrlCreateTreeViewItem("Erscheinungsbild", $TreeView1)
    Global $TreeView1_4 = GUICtrlCreateTreeViewItem("Passwort", $TreeView1)
    ;Global $TreeView1_5 = GUICtrlCreateTreeViewItem("Sonstiges", $TreeView1)
    Global $Topic = GUICtrlCreateLabel("Allgemein", 156, 9, 412, 24, $SS_CENTER)
    GUICtrlSetFont(-1, 12, 400, 4, "MS Reference Sans Serif")

    [/autoit] [autoit][/autoit] [autoit]

    For $i = 1 To 5
    $hGuiChild[$i] = -999 ;= noch nicht erzeugt
    _CreateChild($i) ;ChildGuis werden erzeugt
    Next
    _allgemeinshow()
    GUISetState(@SW_SHOW, $hGuiMain)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    #EndRegion ### END Koda GUI section ###
    While 1
    Local $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Form6_Group2_Label1
    MsgBox(0, "", "hilfedatei mit faktor")
    Case $TreeView1_0
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _allgemeinshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Allgemein")
    Case $TreeView1_1
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _updateshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Update")
    Case $TreeView1_2
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _importexportshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Import/Export")
    Case $TreeView1_3
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _erscheinungsbildshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Erscheinungsbild")
    Case $TreeView1_4
    If $iaktChild > 0 Then GUISetState(@SW_HIDE, $hGuiChild[$iaktChild])
    _passwortshow()
    GUICtrlSetData($Topic, "")
    GUICtrlSetData($Topic, "Passwort")
    EndSwitch
    WEnd
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    Func _CreateChild($iChildNo)
    Switch $iChildNo
    Case 1
    _allgemeinshow()
    Case 2
    _updateshow()
    Case 3
    _importexportshow()
    Case 4
    _erscheinungsbildshow()
    Case 5
    _passwortshow()
    EndSwitch
    EndFunc ;==>_CreateChild

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _allgemeinshow()
    If $hGuiChild[1] < 0 Then
    $hGuiChild[1] = GUICreate("", 500, 300, 0, 0, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    ConsoleWrite("Allgemein wird erzeugt" & @CRLF)
    Global $Form6_Group1 = GUICtrlCreateGroup("Fenster", 183, 42, 286, 85)
    Global $Form6_Group1_Label1 = GUICtrlCreateLabel("Transparenz", 198, 63, 63, 17)
    Global $Form6_Group1_Slider1 = GUICtrlCreateSlider(264, 60, 163, 22)
    GUICtrlSetLimit(-1, 255, 0)
    Global $Form6_Group1_Label2 = GUICtrlCreateLabel("Fenstertitel", 198, 93, 55, 17)
    Global $Form6_Group1_Input1 = GUICtrlCreateInput("%version%", 270, 90, 151, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group2 = GUICtrlCreateGroup("Berechnung", 183, 135, 280, 151)
    Global $Form6_Group2_Label1 = GUICtrlCreateLabel("Faktor der Notenbereiche", 201, 156, 125, 17)
    GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetCursor(-1, 4)
    Global $Form6_Group2_Label2 = GUICtrlCreateLabel("Schulaufgaben", 216, 186, 76, 17)
    Global $Form6_Group2_Label3 = GUICtrlCreateLabel("Extemporalen", 216, 210, 68, 17)
    Global $Form6_Group2_Label4 = GUICtrlCreateLabel("Sonstige Noten", 216, 234, 77, 17)
    Global $Form6_Group2_Input1 = GUICtrlCreateInput("2", 309, 183, 28, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER))
    Global $Form6_Group2_Input2 = GUICtrlCreateInput("1", 309, 207, 28, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER))
    Global $Form6_Group2_Input3 = GUICtrlCreateInput("1", 309, 231, 28, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER))
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUICtrlSetCursor(-1, 7)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\configure.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Allgemein wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[1])
    EndIf
    $iaktChild = 1
    EndFunc ;==>_allgemeinshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _allgemeinhide()
    GUISetState(@SW_HIDE, $hGuiChild[1])
    ConsoleWrite("Allgemein wird versteckt" & @CRLF)
    EndFunc ;==>_allgemeinhide
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    Func _updateshow()
    If $hGuiChild[2] < 0 Then
    $hGuiChild[2] = GUICreate("", 500, 300, 0,0, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    ConsoleWrite("Update wird erzeugt" & @CRLF)
    Global $hGuiMain_Group3 = GUICtrlCreateGroup("Einstellungen", 159, 42, 325, 109)
    Global $hGuiMain_Group3_Checkbox1 = GUICtrlCreateCheckbox("automatisch nach Updates suchen", 171, 81, 193, 19)
    Global $hGuiMain_Group3_Radio1 = GUICtrlCreateRadio("Bei Programmstart", 189, 99, 109, 19)
    Global $hGuiMain_Group3_Radio2 = GUICtrlCreateRadio("Bei Windowsstart", 189, 120, 103, 13)
    Global $hGuiMain_Group3_Checkbox2 = GUICtrlCreateCheckbox("Änderungen anzeigen", 171, 63, 121, 16)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Group3_Button3 = GUICtrlCreateButton("nach Update suchen:", 162, 180, 124, 22, $WS_GROUP)
    Global $hGuiMain_Group3_Label2 = GUICtrlCreateLabel("Es wurde eine neue Version gefunden!", 303, 183, 187, 17)
    Global $hGuiMain_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\webexport.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Update wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[2])
    EndIf
    $iaktChild = 2; $hGuiChild[2]
    EndFunc ;==>_updateshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _updatehide()
    GUISetState(@SW_HIDE, $hGuiChild[2])
    ConsoleWrite("Update wird versteckt" & @CRLF)
    EndFunc ;==>_updatehide
    #ce
    Func _importexportshow()
    If $hGuiChild[3] < 0 Then
    $hGuiChild[3] = GUICreate("", 500, 300, 0,0, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    ConsoleWrite("Import Export wird erzeugt" & @CRLF)
    Global $Form6_Group4 = GUICtrlCreateGroup("Datensicherung", 162, 39, 400, 127)
    Global $Form6_Group4_Label1 = GUICtrlCreateLabel("Benutzer", 183, 63, 46, 17)
    Global $Form6_Group4_List1 = GUICtrlCreateList("", 168, 81, 94, 71)
    Global $Form6_Group4_List2 = GUICtrlCreateList("", 306, 81, 94, 71, BitOR($LBS_SORT, $LBS_MULTIPLESEL, $WS_BORDER))
    Global $Form6_Group4_Label2 = GUICtrlCreateLabel("Jahrgang", 327, 63, 48, 17)
    Global $Form6_Group4_Button1 = GUICtrlCreateButton("->", 270, 105, 25, 25, $WS_GROUP)
    Global $Form6_Group4_Button2 = GUICtrlCreateButton("Sichern", 417, 111, 67, 22, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $Form6_Group5 = GUICtrlCreateGroup("Daten Import", 162, 168, 400, 139)
    Global $Form6_Group5_Input1 = GUICtrlCreateInput("C:\Program Files\", 174, 186, 277, 21)
    Global $Form6_Group5_Button1 = GUICtrlCreateButton("Durchsuchen", 462, 186, 88, 19, $WS_GROUP)
    Global $Form6_Group5_Label1 = GUICtrlCreateLabel("Bitte den zu imporierenden Jahrgang wählen (auch mehr auswählbar)", 174, 210, 329, 17)
    Global $Form6_Group5_List1 = GUICtrlCreateList("", 174, 231, 94, 71, BitOR($LBS_SORT, $LBS_MULTIPLESEL, $WS_BORDER))
    Global $Form6_Group5_Button2 = GUICtrlCreateButton("Import", 486, 282, 64, 19, $WS_GROUP)
    Global $Form6_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\editpaste.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Import Export wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[3])
    EndIf
    $iaktChild = 3;

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_importexportshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _importexporthide()
    ConsoleWrite("Import Export wird angezeigt" & @CRLF)
    GUISetState(@SW_HIDE, $hGuiChild[3])
    EndFunc ;==>_importexporthide
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    Func _erscheinungsbildshow()
    If $hGuiChild[4] < 0 Then
    $hGuiChild[4] = GUICreate("", 500, 300, 0,0, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    ConsoleWrite("Erscheinungsbild wird erzeugt" & @CRLF)
    Global $hGuiMain_Group6 = GUICtrlCreateGroup("Vordefinierte Hintergrundfarben", 162, 42, 187, 79)
    Global $hGuiMain_Group6_Button1 = GUICtrlCreateButton("Blau", 171, 69, 76, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $hGuiMain_Group6_Button2 = GUICtrlCreateButton("Grün", 261, 69, 67, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xC0DCC0)
    Global $hGuiMain_Group6_Button3 = GUICtrlCreateButton("Creme", 171, 90, 76, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xFFFBF0)
    Global $hGuiMain_Group6_Button4 = GUICtrlCreateButton("Grau", 261, 90, 67, 19, $WS_GROUP)
    GUICtrlSetBkColor(-1, 0xBFCDDB)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Group7 = GUICtrlCreateGroup("Farben wählen", 162, 129, 172, 112)
    Global $hGuiMain_Group7_Button1 = GUICtrlCreateButton("Hintergrundfarbe wählen", 171, 147, 130, 22, $WS_GROUP)
    Global $hGuiMain_Group7_Button2 = GUICtrlCreateButton("Schriftfarbe wählen", 171, 171, 130, 22, $WS_GROUP)
    Global $hGuiMain_Group7_Button3 = GUICtrlCreateButton("Linkfarbe wählen", 171, 195, 130, 22, $WS_GROUP)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Group8 = GUICtrlCreateGroup("So sieht es aus", 351, 126, 193, 115)
    Global $hGuiMain_Group8_Graphic1 = GUICtrlCreateGraphic(354, 138, 187, 100)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $hGuiMain_Group8_Label1 = GUICtrlCreateLabel("Testschriftart", 369, 150, 65, 17)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    Global $hGuiMain_Group8_Label2 = GUICtrlCreateLabel("Textlink", 375, 180, 49, 17)
    GUICtrlSetFont(-1, 8, 800, 4, "MS Sans Serif")
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetBkColor(-1, 0xA6CAF0)
    GUICtrlSetCursor(-1, 0)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Global $hGuiMain_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\appearance.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    Else
    ConsoleWrite("Erscheinungsbild wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[4])
    EndIf
    $iaktChild = 4;
    EndFunc ;==>_erscheinungsbildshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _erscheinungsbildhide()
    ConsoleWrite("Erscheinungsbild wird versteckt" & @CRLF)
    GUISetState(@SW_HIDE, $hGuiChild[4])
    EndFunc ;==>_erscheinungsbildhide
    #ce

    [/autoit] [autoit][/autoit] [autoit]

    Func _passwortshow()
    If $hGuiChild[5] < 0 Then
    $hGuiChild[5] = GUICreate("", 500, 300, 0,0, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGuiMain)
    ConsoleWrite("Passwort wird erzeugt" & @CRLF)
    Global $hGuiMain_Group9 = GUICtrlCreateGroup("neues Passwort", 165, 42, 367, 199)
    Global $hGuiMain_Group9_Label1 = GUICtrlCreateLabel("Benutzer:", 186, 60, 49, 17)
    Global $hGuiMain_Group9_Combo1 = GUICtrlCreateCombo("Bitte wählen", 246, 57, 106, 25)
    Global $hGuiMain_Group9_Label2 = GUICtrlCreateLabel("Passwort", 189, 87, 47, 17)
    Global $hGuiMain_Group9_Input1 = GUICtrlCreateInput("", 246, 84, 133, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
    Global $hGuiMain_Group9_Input2 = GUICtrlCreateInput("", 246, 108, 133, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
    Global $hGuiMain_Group9_Label3 = GUICtrlCreateLabel("wiederholen", 174, 111, 61, 17)
    Global $hGuiMain_Group9_Label4 = GUICtrlCreateLabel("Sicherheitsfrage", 171, 135, 80, 17)
    Global $hGuiMain_Group9_Input2 = GUICtrlCreateInput("Anwort", 264, 159, 190, 21)
    Global $hGuiMain_Group9_input3 = GUICtrlCreateInput("Frage stellen, z.b. Mein Lieblingsspiel?", 264, 135, 190, 21)
    Global $hGuiMain_Group9_Button1 = GUICtrlCreateButton("Erstellen", 435, 204, 73, 22, $WS_GROUP)
    Global $hGuiMain_Icon1 = GUICtrlCreateIcon("D:\Marcel\Sonstiges\Skripte\Autoit3\note\4.00\Icons\personal.ico", -1, 24, 219, 99, 99, BitOR($SS_NOTIFY, $WS_GROUP))
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    Else
    ConsoleWrite("Passwort wird angezeigt" & @CRLF)
    GUISetState(@SW_SHOW, $hGuiChild[5])
    EndIf
    $iaktChild = 5; $hGuiChild[5]
    EndFunc ;==>_passwortshow

    [/autoit] [autoit][/autoit] [autoit]

    #cs jetzt unnötig da in MsgLoop-Schleife behandelt
    Func _passworthide()
    ConsoleWrite("Passwort wird versteckt" & @CRLF)
    GUISetState(@SW_HIDE, $hGuiChild[5])
    EndFunc ;==>_passworthide
    #ce

    [/autoit]
  • Hallo Raupi

    Zitat

    autoBert,
    warum hast du die Hintergrundfarben geändert und die Gui´s so komisch verschoben?
    Ich habe mal die Hintergrundfarbe wieder auf Standard gesetzt und die Positionen angepaßt.
    Sah irgendwie ein bischen zu verschoben aus. Sonst habe ich deinen Quellcode nicht verändert.

    Die Hintergrundfarbe habe ich vergessen herauszunehmen zu den Psoitionen siehe:

    Durch das platzieren der Controls auf ChildGUIs hat sich deren Position verändert, diese kannst du dir ja selbst anpassen,

    mfg (Auto)Bert