Transparenter Hintergrund der GUI

  • Guten Abend autoit.de

    das hier ist keine Frage ich wollte nur mal erwähnen das man mit

    [autoit]

    GuiSetState($GUI_BKCOLOR_TRANSPARENT)

    [/autoit]


    den Hintergrund der GUI transparent machen kann(nicht die Controls)

  • ich habs jetzt mal gestestet und funktioniert

    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 109, 29, 192, 124,BitAND($WS_POPUP,$GUI_BKCOLOR_TRANSPARENT))
    $Button1 = GUICtrlCreateButton("Button1", 0, 0, 107, 25, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]
  • Danke AutoBert

    ich kann die GUI jetzt bewegen!


    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 396, 281, 192, 124, $WS_POPUP, $WS_EX_CONTROLPARENT)
    GUICtrlCreateBackgroundImage("Form1", @TempDir & "\background_pic.jpg")
    Func GUICTrlCreateBackGroundImage($fenster_titel, $pfad)
    $size = WinGetPos($fenster_titel,"")
    GUICtrlCreatePic($pfad, 0, 0, $size[2],$size[3])
    GUICtrlSetSTate(-1,$GUI_DISABLE)
    EndFunc ;==>GUICTrlCreateBackGroundImage

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

    ;GUICtrlCreatePic(@TempDir & "\background_pic.jpg", 0, 0, 396, 281)
    $Button1 = GUICtrlCreateButton("Play", 10, 250, 45, 20, $WS_GROUP)
    GUICtrlSetTip ($Button1,"BLUB ")
    $Button2 = GUICtrlCreateButton("Ruhe", 10, 200, 45, 20, $WS_GROUP)
    GUICtrlSetTip ($Button2,"BLUB ")
    $Button3 = GUICtrlCreateButton("Ausw.", 10, 152, 45, 20, $WS_GROUP)
    GUICtrlSetTip ($Button3,"BLUB")
    $Button4 = GUICtrlCreateButton("Exit", 330, 250, 45, 20, $WS_GROUP)
    ;GUICtrlCreatePic(@TempDir & "\background_pic.jpg", 0, 0, 396, 281)

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

    GUISetState(@SW_SHOW)

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

    #EndRegion ### END Koda GUI section ###

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

    FileInstall ("background_pic.jpg", @TempDir & "\background_pic.jpg")
    FileInstall ("P J.MP3", @TempDir & "\P J.MP3")

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg

    Case $Button1
    $Sound1 = SoundPlay(@TempDir & "\P J.MP3",0)

    Case $Button2
    SoundPlay("")

    Case $Button3
    $auswahl = fileopendialog("Such dir was","C:\Users\" & @username & "\Music","Musik(*.mp3)",1+4)
    SoundPlay ( $auswahl,0)

    Case $Button4
    Exit
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    nur das jetzt die Buttons nicht mehr funktionieren,aber das bekomme ich bestimmt hin.

    also Danke nochmal

    Edit: jetzt geht es

    Einmal editiert, zuletzt von Rombur (7. Januar 2010 um 00:58)

    • Offizieller Beitrag

    Das ist doch absoluter Humbug, die GUI ist nicht Transparent. Sie hat nur keinen Rahmen. Laß mal dein $GUI_BKCOLOR_TRANSPARENT weg und es sieht genauso aus. Sobald die Gui größer als der Button ist, kann man die GUI sehen..