Gui in Gui

  • Hi,

    Ich möchte z.b. ne Gui erstellen mit einer Größe von 800x600 und einem Button.
    Wen ich nun auf den Button drücke, dann soll in der rechten unteren Ecke eine 2.te Gui erscheinen.
    Bin nun schon den ganzen Abend in der Hilfe am durchprobieren, aber ohne Erfolg.
    Hat vieleicht einer ne Idee oder probescript.

  • mal was zum "rumspielen"...

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GuiListBox.au3>
    #include <WindowsConstants.au3>
    #include <StaticConstants.au3>
    ;
    Opt("GUIOnEventMode", 1)

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

    #Region Variablen definieren --- Texte
    Global $title = "der titel"
    Global $tit_m1 = "Menü 1", $tit_m2 = "Menü 2"
    Global $sw_mm
    Global $childgui_x = "136", $childgui_y = "72", $childgui_w = "802", $childgui_h = "622" ; Position und Maße der Child-Gui's
    Global $main_form = GUICreate($title, 951, 701, 192, 99) ; Programmfenster
    Global $b_nav[2] = [GUICtrlCreateButton($tit_m1, 10, 75, 110, 20, 0), GUICtrlCreateButton($tit_m2, 10, 98, 110, 20, 0)]
    Global $sub_Form[2] ; Definition der Child-Gui's

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

    GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
    GUICtrlSetOnEvent($b_nav[0], "_nav")
    GUICtrlSetOnEvent($b_nav[1], "_nav")

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

    #Region Child-GUI 1
    $sub_Form[0] = GUICreate("", $childgui_w, $childgui_h, $childgui_x, $childgui_y, $WS_CHILD, -1, $main_form); Child-Fenster 1
    GUISetBkColor(0xFFFFFF)
    GUICtrlCreateGroup($tit_m1, 9, 3, 783, 610)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    #EndRegion Child-GUI 1
    ;
    #Region Child-GUI 2
    $sub_Form[1] = GUICreate("", $childgui_w, $childgui_h, $childgui_x, $childgui_y, $WS_CHILD, -1, $main_form); Child-Fenster 2
    GUISetBkColor(0xFFFFFF)
    GUICtrlCreateGroup($tit_m2, 9, 3, 783, 610)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    #EndRegion Child-GUI 2
    ;

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

    GUISetState(@SW_SHOW, $main_form)
    GUISetState(@SW_SHOW, $sub_Form[0])

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

    While 1
    Sleep(10)
    WEnd

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

    Func _nav()
    Local $pb = @GUI_CtrlId - $b_nav[0]
    If $pb <> $sw_mm Then
    Switch $pb
    Case "0"
    GUISetState(@SW_SHOW, $sub_Form[0])
    Case "1"
    GUISetState(@SW_SHOW, $sub_Form[1])
    EndSwitch
    EndIf
    If $pb <> $sw_mm Then
    GUISetState(@SW_HIDE, $sub_Form[$sw_mm])
    $sw_mm = $pb
    EndIf
    EndFunc ;==>_nav

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

    Func _exit() ; Exit
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    über mich...

    ich habe meine Erfahrungen hauptsächlich gesammelt in (grobe Übersicht):

    - RibbonBar Automation
    - MySQL Nutzung
    - GUIs in vielerlei Ausprägung
    - Nutzung von Powershell / Batch in AutoIt
    - Windows Automatisierung

    außerhalb von AutoIt:

    - Sprachen: PS, Batch, php, html(5), javascript, (perl eingeschränkt), vbs
    - Powershell (AD, WPF inkl. Multi-Threading, ...)
    - Deployment-Automatisierung ohne SCCM
    - Office-Nutzung mit COM-Object (AutoIt, PowerShell)
    - ActiveDirectory und alles was damit zusammenhängt
    - Hyper-V Clustering (Converged / Hyper Converged)
    - Serverhardware (Konfiguration, Aufbau, Architektur, Betrieb)

    Lieblingsthema:

    günstige Automatisierung von Vorgängen, für die andere Firmen viel Geld nehmen

    more to come ...