Transparente GUI

  • Ich brauche mal Hilfe:
    Bei meiner Digitaluhr krieg' ich den Hintergrund einfach nicht transparent, wenn ich $WS_EX_LAYERED benutze ist die GUI ganz weg.

    Spoiler anzeigen
    [autoit]


    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    Opt("GUIOnEventMode", 1)

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

    HotKeySet("{ESC}", "_Ende")

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

    Global $aPoints1[7][2], $aPoints4[7][2]
    $hGUI = GUICreate("GDI+ Digitaluhr V. 1.1", 620, 175, "", "", Default, $WS_EX_LAYERED)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Ende")
    $hWnd = WinGetHandle("GDI+ Digitaluhr V. 1.1")
    GUISetState(@SW_SHOW)

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

    $coloractive = 0xFF00FF00
    $colornotactive = 0xFFE0DFE3
    $counter = 0

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

    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)

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

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hPen1 = _GDIPlus_PenCreate(0xFFCFCFCF)
    $hPen2 = _GDIPlus_BrushCreateSolid(0xFF00FF00)
    $hPen3 = _GDIPlus_BrushCreateSolid(0xFFE0DFE3)

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

    _GDIPlus_GraphicsDrawEllipse($hGraphic, 196, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hGraphic, 196, 100, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hGraphic, 405, 50, 15, 15, $hPen1)
    _GDIPlus_GraphicsDrawEllipse($hGraphic, 405, 100, 15, 15, $hPen1)

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

    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 100, 15, 15, $hPen3)

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

    Func U1()
    $h1 = StringLeft(@HOUR, 1)
    Switch $h1
    Case 0
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(20, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(20, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U1

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

    Func U2()
    $h2 = StringRight(@HOUR, 1)
    Switch $h2
    Case 0
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(115, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(115, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U2

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

    Func U3()
    $h3 = StringLeft(@MIN, 1)
    Switch $h3
    Case 0
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(230, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(230, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U3

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

    Func U4()
    $h4 = StringRight(@MIN, 1)
    Switch $h4
    Case 0
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(325, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(325, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U4

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

    Func U5()
    $h5 = StringLeft(@SEC, 1)
    Switch $h5
    Case 0
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(440, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(440, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U5

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

    Func U6()
    $h6 = StringRight(@SEC, 1)
    Switch $h6
    Case 0
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);0
    Case 1
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);1
    Case 2
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive, $colornotactive);2
    Case 3
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive, $coloractive);3
    Case 4
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $colornotactive, $coloractive, $colornotactive, $coloractive, $colornotactive, $coloractive, $coloractive);4
    Case 5
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $colornotactive, $coloractive);5
    Case 6
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive);6
    Case 7
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $coloractive, $coloractive);7
    Case 8
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive, $coloractive);8
    Case 9
    _7s(535, 20, 0, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive, $colornotactive)
    _7s(535, 20, 0, $coloractive, $coloractive, $coloractive, $coloractive, $colornotactive, $coloractive, $coloractive);9
    EndSwitch
    EndFunc ;==>U6

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

    Func _Dot()
    If $counter = 1 Then
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 100, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 50, 15, 15, $hPen3)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 100, 15, 15, $hPen3)
    $counter = 0
    Else
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 196, 100, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 50, 15, 15, $hPen2)
    _GDIPlus_GraphicsFillEllipse($hGraphic, 405, 100, 15, 15, $hPen2)
    $counter = 1
    EndIf
    EndFunc ;==>_Dot

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

    U1()
    U2()
    U3()
    U4()
    U5()
    U6()
    _Dot()

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

    $Hour = @HOUR
    $Minutes = @MIN
    $Seconds1 = StringLeft(@SEC, 1)
    $Seconds2 = StringRight(@SEC, 1)

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

    While 1
    Select
    Case @HOUR <> $Hour
    U1()
    U2()
    Case @MIN <> $Minutes
    U3()
    U4()
    U5()
    U6()
    Case $Seconds1 <> StringLeft(@SEC, 1)
    U5()
    U6()
    Case $Seconds2 <> StringRight(@SEC, 1)
    U6()
    _Dot()
    EndSelect
    $Seconds1 = StringLeft(@SEC, 1)
    $Seconds2 = StringRight(@SEC, 1)
    $Minutes = @MIN
    $Hour = @HOUR
    Sleep(100)
    WEnd

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

    Func _7s($x, $y, $delete = 0, $c1 = $colornotactive, $c2 = $colornotactive, $c3 = $colornotactive, $c4 = $colornotactive, $c5 = $colornotactive, $c6 = $colornotactive, $c7 = $colornotactive)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Local $aPoints1[7][2], $aPoints2[7][2], $aPoints3[7][2], $aPoints4[7][2], $aPoints5[7][2], $aPoints6[7][2], $aPoints7[7][2], $hPen[14], $Graphic[14]
    If $delete = 0 Then

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

    $Posx1 = $x
    $Posy1 = $y
    $aPoints1[0][0] = 6

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

    $aPoints1[1][0] = $Posx1
    $aPoints1[1][1] = $Posy1

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

    $aPoints1[2][0] = $Posx1 + 10
    $aPoints1[2][1] = $Posy1 - 5

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

    $aPoints1[6][0] = $Posx1 + 10
    $aPoints1[6][1] = $Posy1 + 5

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

    $aPoints1[3][0] = $Posx1 + 50
    $aPoints1[3][1] = $Posy1 - 5

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

    $aPoints1[5][0] = $Posx1 + 50
    $aPoints1[5][1] = $Posy1 + 5

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

    $aPoints1[4][0] = $Posx1 + 60
    $aPoints1[4][1] = $Posy1

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

    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $hPen[0] = _GDIPlus_PenCreate($c1)
    $hPen[1] = _GDIPlus_BrushCreateSolid($c1)
    $Graphic[0] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints1, $hPen[0])
    $Graphic[1] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints1, $hPen[1])

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx2 = $x
    $Posy2 = $y + 63
    $aPoints2[0][0] = 6

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

    $aPoints2[1][0] = $Posx2
    $aPoints2[1][1] = $Posy2

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

    $aPoints2[2][0] = $Posx2 + 10
    $aPoints2[2][1] = $Posy2 - 5

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

    $aPoints2[6][0] = $Posx2 + 10
    $aPoints2[6][1] = $Posy2 + 5

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

    $aPoints2[3][0] = $Posx2 + 50
    $aPoints2[3][1] = $Posy2 - 5

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

    $aPoints2[5][0] = $Posx2 + 50
    $aPoints2[5][1] = $Posy2 + 5

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

    $aPoints2[4][0] = $Posx2 + 60
    $aPoints2[4][1] = $Posy2
    $hPen[2] = _GDIPlus_PenCreate($c2)
    $hPen[3] = _GDIPlus_BrushCreateSolid($c2)
    $Graphic[2] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints2, $hPen[2])
    $Graphic[3] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints2, $hPen[3])

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx3 = $x
    $Posy3 = $y + 127
    $aPoints3[0][0] = 6

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

    $aPoints3[1][0] = $Posx3
    $aPoints3[1][1] = $Posy3

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

    $aPoints3[2][0] = $Posx3 + 10
    $aPoints3[2][1] = $Posy3 - 5

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

    $aPoints3[6][0] = $Posx3 + 10
    $aPoints3[6][1] = $Posy3 + 5

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

    $aPoints3[3][0] = $Posx3 + 50
    $aPoints3[3][1] = $Posy3 - 5

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

    $aPoints3[5][0] = $Posx3 + 50
    $aPoints3[5][1] = $Posy3 + 5

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

    $aPoints3[4][0] = $Posx3 + 60
    $aPoints3[4][1] = $Posy3

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

    $hPen[4] = _GDIPlus_PenCreate($c3)
    $hPen[5] = _GDIPlus_BrushCreateSolid($c3)
    $Graphic[4] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints3, $hPen[4])
    $Graphic[5] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints3, $hPen[5])

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;vertikal;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx4 = $x - 3
    $Posy4 = $y
    $aPoints4[0][0] = 6

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

    $aPoints4[1][0] = $Posx4
    $aPoints4[1][1] = $Posy4

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

    $aPoints4[2][0] = $Posx4 + 5
    $aPoints4[2][1] = $Posy4 + 10

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

    $aPoints4[3][0] = $Posx4 + 5
    $aPoints4[3][1] = $Posy4 + 50

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

    $aPoints4[4][0] = $Posx4
    $aPoints4[4][1] = $Posy4 + 60

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

    $aPoints4[5][0] = $Posx4 - 5
    $aPoints4[5][1] = $Posy4 + 50

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

    $aPoints4[6][0] = $Posx4 - 5
    $aPoints4[6][1] = $Posy4 + 10
    $hPen[6] = _GDIPlus_PenCreate($c4)
    $hPen[7] = _GDIPlus_BrushCreateSolid($c4)
    $Graphic[6] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints4, $hPen[6])
    $Graphic[7] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints4, $hPen[7])

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx5 = $x - 3
    $Posy5 = $y + 66
    $aPoints5[0][0] = 6

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

    $aPoints5[1][0] = $Posx5
    $aPoints5[1][1] = $Posy5

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

    $aPoints5[2][0] = $Posx5 + 5
    $aPoints5[2][1] = $Posy5 + 10

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

    $aPoints5[3][0] = $Posx5 + 5
    $aPoints5[3][1] = $Posy5 + 50

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

    $aPoints5[4][0] = $Posx5
    $aPoints5[4][1] = $Posy5 + 60

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

    $aPoints5[5][0] = $Posx5 - 5
    $aPoints5[5][1] = $Posy5 + 50

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

    $aPoints5[6][0] = $Posx5 - 5
    $aPoints5[6][1] = $Posy5 + 10
    $hPen[8] = _GDIPlus_PenCreate($c5)
    $hPen[9] = _GDIPlus_BrushCreateSolid($c5)
    $Graphic[8] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints5, $hPen[8])
    $Graphic[9] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints5, $hPen[9])

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx6 = $x + 62
    $Posy6 = $y
    $aPoints6[0][0] = 6

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

    $aPoints6[1][0] = $Posx6
    $aPoints6[1][1] = $Posy6

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

    $aPoints6[2][0] = $Posx6 + 5
    $aPoints6[2][1] = $Posy6 + 10

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

    $aPoints6[3][0] = $Posx6 + 5
    $aPoints6[3][1] = $Posy6 + 50

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

    $aPoints6[4][0] = $Posx6
    $aPoints6[4][1] = $Posy6 + 60

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

    $aPoints6[5][0] = $Posx6 - 5
    $aPoints6[5][1] = $Posy6 + 50

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

    $aPoints6[6][0] = $Posx6 - 5
    $aPoints6[6][1] = $Posy6 + 10
    $hPen[10] = _GDIPlus_PenCreate($c6)
    $hPen[11] = _GDIPlus_BrushCreateSolid($c6)
    $Graphic[10] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints6, $hPen[10])
    $Graphic[11] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints6, $hPen[11])

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    $Posx7 = $x + 62
    $Posy7 = $y + 63
    $aPoints7[0][0] = 6

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

    $aPoints7[1][0] = $Posx7
    $aPoints7[1][1] = $Posy7

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

    $aPoints7[2][0] = $Posx7 + 5
    $aPoints7[2][1] = $Posy7 + 10

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

    $aPoints7[3][0] = $Posx7 + 5
    $aPoints7[3][1] = $Posy7 + 50

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

    $aPoints7[4][0] = $Posx7
    $aPoints7[4][1] = $Posy7 + 60

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

    $aPoints7[5][0] = $Posx7 - 5
    $aPoints7[5][1] = $Posy7 + 50

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

    $aPoints7[6][0] = $Posx7 - 5
    $aPoints7[6][1] = $Posy7 + 10
    $hPen[12] = _GDIPlus_PenCreate($c7)
    $hPen[13] = _GDIPlus_BrushCreateSolid($c7)
    $Graphic[12] = _GDIPlus_GraphicsDrawPolygon($hGraphic, $aPoints7, $hPen[12])
    $Graphic[13] = _GDIPlus_GraphicsFillPolygon($hGraphic, $aPoints7, $hPen[13])
    Else
    For $i = 0 To 12 Step 2
    _GDIPlus_PenDispose($hPen[$i])
    Next
    For $ii = 1 To 13 Step 2
    _GDIPlus_BrushDispose($hPen[$i])
    Next
    For $iii = 0 To 13
    _GDIPlus_GraphicsDispose($hGraphic)
    Next
    _GDIPlus_Shutdown()
    EndIf
    EndFunc ;==>_7s

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

    Func _Ende()
    _GDIPlus_PenDispose($hPen1)
    _GDIPlus_BrushDispose($hPen2)
    _GDIPlus_BrushDispose($hPen3)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Ende

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

    Einmal editiert, zuletzt von xp_fan (27. Dezember 2009 um 18:06)

  • Danke, aber das suche ich nicht. Ich möchte nur den Hintergrund transparent machen, sodass man nur die Anzeigen sieht.

  • Hab ich bei meiner drin, kannst dir ja anschauen:

    Spoiler anzeigen
    [autoit]

    ;Author: Greek
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <GDIPlus.au3>

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

    HotKeySet ("{ESC}","_CleanEnd")

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

    Global $GUIBreite=400
    Global $GUIHoehe=150

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

    $hGui=GUICreate("Uhr", $GUIBreite, $GUIHoehe, Default, Default, $WS_POPUP, BitOR($WS_EX_LAYERED,$WS_EX_TOOLWINDOW,$WS_EX_TOPMOST))
    GUISetBkColor(0x000000)
    GUICtrlCreateLabel("", 0, 0, $GUIBreite, $GUIHoehe, -1, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    _WinAPI_SetLayeredWindowAttributes($hGui, 0x000000, 0,0x01)
    _GuiRoundCorners($hGui,0,0,400,150)
    GUISetState()

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

    _GDIPlus_Startup()

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

    $hGraphic=_GDIPlus_GraphicsCreateFromHWND($hGui)
    $hBrush = _GDIPlus_BrushCreateSolid (0xFF00FF00)
    $hFormat = _GDIPlus_StringFormatCreate ()
    $hFamily = _GDIPlus_FontFamilyCreate ("Arial")
    $hFont = _GDIPlus_FontCreate ($hFamily, 40, 2)
    $tLayout = _GDIPlus_RectFCreate (85, 40, 300, 100)
    _GDIPlus_GraphicsDrawStringEx ($hGraphic, @HOUR&":"&@MIN&":"&@SEC, $hFont, $tLayout, $hFormat, $hBrush)

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

    AdlibRegister("_Update",1000)

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

    While 1
    Sleep ( 200 )
    WEnd

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

    Func _Update()
    _GDIPlus_GraphicsClear($hGraphic,0xFF000000)
    _GDIPlus_GraphicsDrawStringEx ($hGraphic, @HOUR&":"&@MIN&":"&@SEC, $hFont, $tLayout, $hFormat, $hBrush)
    EndFunc

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

    Func _CleanEnd()
    _GDIPlus_FontDispose ($hFont)
    _GDIPlus_FontFamilyDispose ($hFamily)
    _GDIPlus_StringFormatDispose ($hFormat)
    _GDIPlus_BrushDispose ($hBrush)
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_Shutdown ()
    Exit
    EndFunc

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

    Func _GuiRoundCorners($hWnd, $x1, $y1, $x3, $y3)
    Local $pos, $ret, $ret2
    $pos = WinGetPos($hWnd)
    $ret = DllCall('gdi32.dll', 'long', 'CreateRoundRectRgn', 'long', $x1, 'long', $y1, 'long', $pos[2], 'long', $pos[3], 'long', $x3, 'long', $y3)
    If $ret[0] Then
    $ret2 = DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $hWnd, 'long', $ret[0], 'int', 1)
    If $ret2[0] Then
    Return 1
    Else
    Return 0
    EndIf
    Else
    Return 0
    EndIf
    EndFunc

    [/autoit]

    Edit: Nochma nur mit Trans reingestellt:

    [autoit]

    _WinAPI_SetLayeredWindowAttributes($hGui, 0x000000, 0,0x01)

    [/autoit]


    In der Hilfe anschauen.

    Einmal editiert, zuletzt von Greek (27. Dezember 2009 um 18:05)