GUI in GUI

  • Moin ich wollte fragen ob es möglich ist eine GUI in einer anderen GUI zu öffnen

    also das wenn etwas passiert das noch eine GUI aufgehen soll

    Geht das?

  • Ja, meinst du sowas?

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Haubtgui", 413, 298, 100, 219)
    GUICtrlCreateLabel ("Haubtgui",10,10)
    $Button1 = GUICtrlCreateButton("Button1", 105, 42, 75, 25, 0)
    $Input1 = GUICtrlCreateInput("Input1", 45, 132, 121, 21)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Nebengui", 413, 298, 600, 219)
    $Input2 = GUICtrlCreateInput("Input1", 15, 54, 121, 21)
    $Button2 = GUICtrlCreateButton("Button1", 111, 195, 75, 25, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg(1)
    Switch $nMsg[1]
    Case $Form1
    Switch $nMsg[0]
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $1 = GUICtrlRead ($Input1)
    GUICtrlSetData ($Input2,$1)
    EndSwitch
    Case $Form2
    Switch $nMsg[0]
    Case $Button2
    $2 = GUICtrlRead ($Input2)
    GUICtrlSetData ($Input1,$2)
    Case $GUI_EVENT_CLOSE
    GUISetState (@SW_HIDE,$Form2)
    EndSwitch
    EndSwitch
    WEnd

    [/autoit]

    mfg. Jam00

  • Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Haubtgui", 413, 298, 100, 219)
    GUICtrlCreateLabel ("Haubtgui",10,10)
    $Button1 = GUICtrlCreateButton("Öffnen", 105, 42, 75, 25, 0)
    ;~ $Input1 = GUICtrlCreateInput("Input1", 45, 132, 121, 21)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    #Region ### START Koda GUI section ### Form=
    $Form2 = GUICreate("Nebengui", 413, 298, 600, 219)
    ;~ $Input2 = GUICtrlCreateInput("Input1", 15, 54, 121, 21)
    $Button2 = GUICtrlCreateButton("Schließen", 111, 195, 75, 25, 0)
    ;~ GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
    $nMsg = GUIGetMsg(1)
    Switch $nMsg[1]
    Case $Form1
    Switch $nMsg[0]
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    ;~ $1 = GUICtrlRead ($Input1)
    ;~ GUICtrlSetData ($Input2,$1)
    GUISetState (@SW_SHOW,$Form2)
    EndSwitch
    Case $Form2
    Switch $nMsg[0]
    Case $Button2
    ;~ $2 = GUICtrlRead ($Input2)
    ;~ GUICtrlSetData ($Input1,$2)
    GUISetState (@SW_HIDE,$Form2)
    Case $GUI_EVENT_CLOSE
    GUISetState (@SW_HIDE,$Form2)
    EndSwitch
    EndSwitch
    WEnd

    [/autoit]

    mfg. Jam00

  • Ich hab hier mal was gemacht für einen Transparenten Ramen, das sind auch 2 Fenster nur mit dem Style $WS_POPUP

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    $Ramen = GUICreate ("Transparenter Ramen",400,400,400,400,$WS_POPUP)
    GUISetBkColor (0x0077FF,$Ramen)
    ;~ GUICtrlCreatePic (@ScriptDir & "\Data\1.bmp",0,0,400,400,$WS_CLIPSIBLINGS)
    GUICtrlCreateLabel ("",0,0,400,400,$WS_EX_TRANSPARENT,$GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor (-1,$GUI_BKCOLOR_TRANSPARENT)
    $Pos = WinGetPos ($Ramen)
    $Innen = GUICreate("", $Pos[2] -15, $Pos[3] -35, 5,25,$WS_POPUP,$WS_EX_MDICHILD, $Ramen);
    ;~ GUISetBkColor (0x00FF00,$Innen)
    GUISetState (@SW_SHOW,$Ramen)
    GUISetState (@SW_SHOW,$Innen)
    WinSetTrans ($Ramen,"",200)
    _Ecken($Ramen,0,0,10,10)
    GUIRegisterMsg($WM_MOVE, "_Move")
    While 1
    Sleep (100)
    WEnd
    Func _Ecken($h_win, $i_x1, $i_y1, $i_x3, $i_y3)
    Local $XS_pos, $XS_ret, $XS_ret2
    $XS_pos = WinGetPos($h_win)
    $XS_ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $i_x1, "long", $i_y1, "long", $XS_pos[2], "long", $XS_pos[3], "long", $i_x3, "long", $i_y3)
    If $XS_ret[0] Then
    $XS_ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $h_win, "long", $XS_ret[0], "int", 1)
    EndIf
    EndFunc ;==>_GuiRoundCorners
    Func _Move()
    GUISetState (@SW_LOCK)
    GUISetState (@SW_UNLOCK)
    EndFunc

    [/autoit]

    mfg. Jam00