Per Button eine Neue Form öffnen

  • Moin Leute
    Ich bin gerade ein wenig damit beschäftigt mit AtuoIT was zu Programmieren.
    Nun hab ich ne Frage, Wie kann ich per Button eine nue Form öffnen wo ich dann anschliesend Optionen einbauen kann?
    Ich danke schonmal im Vorraus für eure Hilfe

    MfG
    Dr. Sp!c

  • Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    $Form1 = GUICreate("Form1", 200, 200)
    $Button1 = GUICtrlCreateButton("Button1", 16, 16, 75, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)

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

    $Form2 = GUICreate("Form2", 200, 200)
    GUISetState(@SW_HIDE)

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

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    GUISetState(@SW_SHOW, $Form2)
    EndSwitch
    WEnd

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

    http://translation.autoit.de/onlinehilfe/guiref/GUIRef.htm