Pseudo Aero Look (Glas Effekt) für WindowsXP Build 2011-12-02

  • Beim Testen von Windows Screenhooter unter WinXP ist mir aufgefallen, dass ich den Bildschirm hinter einer GUI herauslesen und darstellen kann.

    Da kam mir die Idee, ob sich unter WinXP ein Aero Effekt implementieren lässt!

    Heraus kam das Ding hier (optimierte Version von eukalyptus weiter unten!):

    Spoiler anzeigen
    [autoit]


    ;Pseudo Aero Look für WindowsXP Build 2011-12-02 by UEZ
    #include <GDIPlus.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    Opt("MustDeclareVars", 1)
    Opt("GUIOnEventMode", 1)

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

    Global Const $hDwmApiDll = DllOpen("dwmapi.dll")
    Global $sChkAero = DllStructCreate("int;")
    DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero))
    Global $aero = DllStructGetData($sChkAero, 1)
    If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", False)
    Global $dy
    If @OSBuild < 6000 Then
    Global $aTheme = _WinAPI_GetCurrentThemeName()
    If Not @error Then
    $dy = -54
    Else
    $dy = -40
    EndIf
    Else
    $dy = -47
    EndIf

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

    _GDIPlus_Startup()

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

    Global Const $hFullScreen = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]")
    Global Const $aFullScreen = WinGetPos($hFullScreen)

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

    Global Const $fW = 4
    Global Const $fH = 32
    Global Const $iW = 640
    Global Const $iH = 400
    Global Const $hGUI = GUICreate("", $iW, $iH, -1, -1, $WS_POPUP, $WS_EX_OVERLAPPEDWINDOW + $WS_EX_TOPMOST)
    Global Const $idTitle = GUICtrlCreateLabel("Pseudo Aero Effect by UEZ", $fW + 16, $fh / 3, 150, 16)
    GUICtrlSetFont(-1, 9, 800, 0, "Arial", 4)
    GUICtrlSetBkColor(-1, -2)

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

    ;~ Global Const $idLabel = GUICtrlCreateLabel(@LF & @LF & @LF & @TAB & "Done by UEZ 2011", $fW, $fH, $iW - 2 * $fW - 2, $iH - $fH - $fW)
    ;~ GUICtrlSetFont(-1, 30, 400, 0, "Arial", 4)
    ;~ GUICtrlSetBkColor(-1, -2)
    Global Const $idLabel_Min = GUICtrlCreateLabel("[_]", $iW - 50, $fH / 3, $fh / 2, $fh / 2)
    GUICtrlSetBkColor(-1, -2)
    Global Const $idLabel_Close = GUICtrlCreateLabel("[X]", $iW - 30, $fH / 3, $fh / 2, $fh / 2)
    GUICtrlSetBkColor(-1, -2)

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

    WinSetTrans($hGUI, "", 0xFF)

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

    Global Const $hGUI_Hidden = GUICreate("", $iW, $iH, 0, 0, Default, $WS_EX_MDICHILD + $WS_EX_LAYERED, $hGUI)
    GUISetState(@SW_HIDE, $hGUI_Hidden)
    GUISetState(@SW_SHOW, $hGUI)
    _SetGuiRoundCorners($hGUI, 16, True, False, True, False)

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

    Global $hDev = _WinAPI_GetDC($hGUI)
    Global $hDC_Area = _WinAPI_CreateCompatibleDC($hDev)
    Global $hBitmap_Area = _WinAPI_CreateCompatibleBitmap($hDev, $aFullScreen[2], $aFullScreen[3])

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

    Global Const $hDC_Zoom = _WinAPI_GetDC(0)
    Global Const $hGUI_ZoomDC = _WinAPI_GetDC($hGUI_Hidden)

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

    Global Const $memDC = _WinAPI_CreateCompatibleDC($hGUI_ZoomDC)
    Global Const $memBmp = _WinAPI_CreateCompatibleBitmap($hGUI_ZoomDC, $iW, $iH)
    _WinAPI_SelectObject($memDC, $memBmp)

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

    Global $aPos = WinGetPos($hGUI)
    _WinAPI_StretchBlt($hGUI_ZoomDC, 0, 0, $iW, $iH, $hDC_Zoom, $aPos[0], $aPos[1], $iW, $iH, $SRCCOPY)

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

    _WinAPI_BitBlt($memDC, 0, 0, $iW, $iH, $hGUI_ZoomDC, 0, $dy, 0x00CC0020)

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

    Global Const $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    Global Const $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphic)
    Global Const $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)

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

    Global Const $GW_CHILD = 5
    Global Const $GW_HWNDNEXT = 2
    Global $hRegion = _GDIPlus_RegionCreateFromRect(_GDIPlus_RectFCreate(0, 0, $iW, $iH))
    Global $hChild = _WinAPI_GetWindow($hGUI, $GW_CHILD)
    Global $aRect, $msg

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

    Do
    $aRect = ControlGetPos($hChild, "", 0)
    _GDIPlus_RegionCombineRect($hRegion, _GDIPlus_RectFCreate($aRect[0], $aRect[1], $aRect[2], $aRect[3]), 3)
    $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT)
    Until Not $hChild
    _GDIPlus_GraphicsSetClipRegion($hGraphic, $hRegion)
    _GDIPlus_RegionDispose($hRegion)

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

    Global $tRectF = _GDIPlus_RectFCreate(0, 0, $iW / 1.5, $iH / 1.5)
    Global $hBrush = _GDIPlus_LineBrushCreateFromRectWithAngle($tRectF, 0x80201010, 0xA0F0F0F0, -60, False, 1)

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

    Global $hBmp = _GDIPlus_BitmapCreateFromHBITMAP($memBmp)
    Global $hBmp_Blur = _Blur($hBmp, $iW, $iH)
    _GDIPlus_GraphicsDrawImage($hContext, $hBmp_Blur, 0, 0)

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

    _GDIPlus_GraphicsFillRect($hContext, 0, 0, $iW, $iH, $hBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH)
    _GDIPlus_BitmapDispose($hBmp)
    _GDIPlus_BitmapDispose($hBmp_Blur)

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

    GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED")
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")

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

    Global $exit = False

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

    GUISetOnEvent($GUI_EVENT_RESTORE, "Restored", $hGUI)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $hGUI)
    GUICtrlSetOnEvent($idLabel_Close, "_Exit")
    GUICtrlSetOnEvent($idLabel_Min, "_MinWin")

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

    While Sleep(30)
    ;~ Repaint()
    If $exit Then ExitLoop
    WEnd

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

    GUIRegisterMsg($WM_WINDOWPOSCHANGED, "")
    _WinAPI_DeleteDC($memDC)
    _WinAPI_DeleteObject($memBmp)
    _WinAPI_DeleteObject($hBitmap_Area)
    _WinAPI_ReleaseDC($hGUI, $hDev)
    _WinAPI_ReleaseDC($hGUI, $hGUI_ZoomDC)
    _WinAPI_ReleaseDC(0, $hDC_Zoom)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_GraphicsDispose($hContext)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()
    GUIDelete()
    $tRectF = 0
    If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", True)
    Exit

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

    Func _Exit()
    $exit = True
    EndFunc

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

    Func _MinWin()
    GUISetState(@SW_MINIMIZE, $hGUI)
    EndFunc

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

    Func Restored()
    Repaint()
    EndFunc

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

    Func WM_WINDOWPOSCHANGED($hWnd, $iMsg, $StartWIndowPosaram, $lParam)
    Repaint()
    Return "GUI_RUNDEFMSG"
    EndFunc

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

    Func Repaint()
    $aPos = WinGetPos($hGUI)
    _WinAPI_StretchBlt($hGUI_ZoomDC, 0, 0, $iW, $iH, $hDC_Zoom, $aPos[0]+16, $aPos[1] + 3, $iW, $iH, $SRCCOPY)
    _WinAPI_BitBlt($memDC, 0, 0, $iW, $iH, $hGUI_ZoomDC, 0, $dy, 0x00CC0020)
    DllStructSetData($tRectF, "X", $aPos[0])
    DllStructSetData($tRectF, "Y", $aPos[1])
    $hBrush = _GDIPlus_LineBrushCreateFromRectWithAngle($tRectF, 0x80302020, 0xA0F0F0F0, -60, False, 1)
    $hBmp = _GDIPlus_BitmapCreateFromHBITMAP($memBmp)
    $hBmp_Blur = _Blur($hBmp, $iW, $iH)
    _GDIPlus_GraphicsDrawImage($hContext, $hBmp_Blur, 0, 0)
    _GDIPlus_GraphicsFillRect($hContext, 0, 0, $iW, $iH, $hBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH)
    _GDIPlus_BitmapDispose($hBmp)
    _GDIPlus_BitmapDispose($hBmp_Blur)
    _GDIPlus_BrushDispose($hBrush)
    EndFunc

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

    Func WM_NCHITTEST($hWndGUI, $MsgID, $WParam, $LParam)
    If ($hWndGUI = $hGui) And ($MsgID = $WM_NCHITTEST) Then Return $HTCAPTION
    EndFunc ;==>WM_NCHITTEST

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

    Func _Blur($hBitmap, $iW, $iH, $fScale = 0.30, $qual = 6); by eukalyptus
    Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND(_WinAPI_GetDesktopWindow())
    Local $hBmpSmall = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    Local $hGfxSmall = _GDIPlus_ImageGetGraphicsContext($hBmpSmall)
    DllCall($ghGDIPDll, "uint", "GdipSetPixelOffsetMode", "hwnd", $hGfxSmall, "int", 2)
    Local $hBmpBig = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics)
    Local $hGfxBig = _GDIPlus_ImageGetGraphicsContext($hBmpBig)
    DllCall($ghGDIPDll, "uint", "GdipSetPixelOffsetMode", "hwnd", $hGfxBig, "int", 2)
    _GDIPlus_GraphicsScaleTransform($hGfxSmall, $fScale, $fScale)
    _GDIPlus_GraphicsSetInterpolationMode($hGfxSmall, $qual)

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

    _GDIPlus_GraphicsScaleTransform($hGfxBig, 1 / $fScale, 1 / $fScale)
    _GDIPlus_GraphicsSetInterpolationMode($hGfxBig, $qual)

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

    _GDIPlus_GraphicsDrawImageRect($hGfxSmall, $hBitmap, 0, 0, $iW, $iH)
    _GDIPlus_GraphicsDrawImageRect($hGfxBig, $hBmpSmall, 0, 0, $iW, $iH)

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

    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_BitmapDispose($hBmpSmall)
    _GDIPlus_GraphicsDispose($hGfxSmall)
    _GDIPlus_GraphicsDispose($hGfxBig)
    Return $hBmpBig
    EndFunc ;==>_Blur

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

    Func _WinAPI_StretchBlt($hDestDC, $iXDest, $iYDest, $iWidthDest, $iHeightDest, $hSrcDC, $iXSrc, $iYSrc, $iWidthSrc, $iHeightSrc, $iRop)
    Local $Ret = DllCall("gdi32.dll", "int", "StretchBlt", "hwnd", $hDestDC, "int", $iXDest, "int", $iYDest, "int", $iWidthDest, "int", $iHeightDest, "hwnd", $hSrcDC, "int", $iXSrc, "int", $iYSrc, "int", $iWidthSrc, "int", $iHeightSrc, "dword", $iRop)
    If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0)
    Return 1
    EndFunc ;==>_WinAPI_StretchBlt

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _WinAPI_GetCurrentThemeName
    ; Description....: Retrieves the name of the current visual styles, color scheme name, and size name.
    ; Syntax.........: _WinAPI_GetCurrentThemeName ( )
    ; Parameters.....: None
    ; Return values..: Success - The array that contains the following information:
    ;
    ; [0] - The theme path and file name.
    ; [1] - The color scheme name.
    ; [2] - The size name.
    ;
    ; Failure - 0 and sets the @error flag to non-zero, @extended flag may contain the system error code.
    ; Author.........: Yashied
    ; Modified.......:
    ; Remarks........: None
    ; Related........:
    ; Link...........: @@MsdnLink@@ GetCurrentThemeName
    ; Example........: Yes
    ; ===============================================================================================================================
    Func _WinAPI_GetCurrentThemeName()
    Local $Ret = DllCall('uxtheme.dll', 'uint', 'GetCurrentThemeName', 'wstr', '', 'int', 4096, 'wstr', '', 'int', 2048, 'wstr', '', 'int', 2048)
    If @error Then
    Return SetError(1, 0, 0)
    Else
    If $Ret[0] Then
    Return SetError(1, $Ret[0], 0)
    EndIf
    EndIf
    Local $Result[3]
    For $i = 0 To 2
    $Result[$i] = $Ret[$i * 2 + 1]
    Next
    Return $Result
    EndFunc ;==>_WinAPI_GetCurrentThemeName

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

    Func _SetGuiRoundCorners($hGUI, $iEllipse, $iLeftUp = True, $iLeftDown = True, $iRightUp = True, $iRightDown = True)
    Local $hCornerRgn
    Local $aGuiSize = WinGetPos($hGUI)
    Local $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $aGuiSize[2], $aGuiSize[3], $iEllipse, $iEllipse)
    If $iLeftUp = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn(0, 0, $aGuiSize[2] / 2, $aGuiSize[3] / 2)
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    If $iLeftDown = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn(0, $aGuiSize[3] / 2, $aGuiSize[2] / 2, $aGuiSize[3])
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    If $iRightUp = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn($aGuiSize[2] / 2, 0, $aGuiSize[2], $aGuiSize[3] / 2)
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    If $iRightDown = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn($aGuiSize[2] / 2, $aGuiSize[3] / 2, $aGuiSize[2] - 1, $aGuiSize[3] - 1)
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    _WinAPI_SetWindowRgn($hGUI, $hRgn)
    EndFunc ;==>_SetGuiRoundCorners

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

    #region additional GDI+ functions
    Func _GDIPlus_GraphicsScaleTransform($hGraphics, $nScaleX, $nScaleY, $iOrder = 0)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGraphics, "float", $nScaleX, "float", $nScaleY, "int", $iOrder)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc ;==>_GDIPlus_GraphicsScaleTransform

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

    Func _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "hwnd", $hGraphics, "int", $iInterpolationMode)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc ;==>_GDIPlus_GraphicsSetInterpolationMode

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

    Func _GDIPlus_LineBrushCreateFromRectWithAngle($tRectF, $iARGBClr1, $iARGBClr2, $nAngle, $fIsAngleScalable = True, $iWrapMode = 0)
    Local $pRectF, $aResult
    $pRectF = DllStructGetPtr($tRectF)
    $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrushFromRectWithAngle", "ptr", $pRectF, "uint", $iARGBClr1, "uint", $iARGBClr2, "float", $nAngle, "int", $fIsAngleScalable, "int", $iWrapMode, "int*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[7]
    EndFunc ;==>_GDIPlus_LineBrushCreateFromRectWithAngle

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

    Func _GDIPlus_GraphicsSetClipRegion($hGraphics, $hRegion, $iCombineMode = 0)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetClipRegion", "hwnd", $hGraphics, "hwnd", $hRegion, "int", $iCombineMode)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc

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

    Func _GDIPlus_RegionCreateFromRect($tRectF)
    Local $pRectF, $aResult
    $pRectF = DllStructGetPtr($tRectF)
    $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateRegionRect", "ptr", $pRectF, "int*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[2]
    EndFunc

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

    Func _GDIPlus_RegionCombineRect($hRegion, $tRectF, $iCombineMode = 2)
    Local $pRectF, $aResult
    $pRectF = DllStructGetPtr($tRectF)
    $aResult = DllCall($ghGDIPDll, "uint", "GdipCombineRegionRect", "hwnd", $hRegion, "ptr", $pRectF, "int", $iCombineMode)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc

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

    Func _GDIPlus_RegionDispose($hRegion)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDeleteRegion", "hwnd", $hRegion)
    If @error Then Return SetError(@error, @extended, False)
    Return $aResult[0] = 0
    EndFunc
    #endregion

    [/autoit]

    Ich persönlich benutze WinXP zum Kompatibilitätstest, wenn ich Lust habe und somit ist dies wirklich nur als experimentell anzusehen!

    Einige Dinge, wie z.B. ständiges Update oder transparente Label fehlen noch. Wer Lust hat, kann ja herum basteln!

    Außerdem ist das Ganze etwas langsam. Wenn die klassische Ansicht aktiviert ist, muss der Parameter für _WinAPI_BitBlt($memDC, 0, 0, $iW, $iH, $hGUI_ZoomDC, 0, -52, 0x00CC0020) auf -38 angepasst werden, damit die Darstellung einigermaßen stimmt.

    Wenn jemand eine Möglichkeit kennt zwischen der klassischen Ansicht und Luna zu unterscheiden, dann her damit.

    Gruß,
    UEZ

  • Hi UEZ,

    das hört sich ja toll an. :)
    Leider habe ich kein XP installiert. Könntest Du bitte evtl. einen Screenshot zeigen ?

    Vielleicht könntest Du mit Andys OpenCL-Funktionen mehr heraus holen.
    Vystal und FastAero benutzen glaube ich DX9 dafür, wenn ich mich nicht irre ...


    Gruß
    Greenhorn


    2 Mal editiert, zuletzt von Greenhorn (1. Dezember 2011 um 17:35)

  • Sehr geiles Script!

    Du brauchst nicht auf die eingestellte Ansicht zu achten - mit ClientToScreen bekommst du die genauen Screen Koordinaten des Clientbereichs...

    Ich hab versucht das Script mit einer anderen Methode schneller zu machen:
    hBitmap vom Desktop wird direkt in ein Gdiplus-Bitmap umgewandelt.
    Dieses verkleinert und dann vergrößert (Blur-Effekt)
    Farbverlauf darüber und dann auf das Fenster geblittet - das wars

    Dadurch ist die Funktion etwa 10ms schneller (25ms statt 35ms bei mir)

    Das Ruckeln ist aber immer noch vorhanden. Das liegt aber nicht (nur) an der Geschwindigkeit, sondern am Verschieben des Fensters.
    Ich hab mich damit schon ein paar mal beschäftigt, aber noch keine Lösung gefunden.
    Bei meinen Scripten BlackHole und Mauslupe hab ich dann einfach ein Fullscreenfenster genommen und so das Verschiebe-ruckeln umgangen ;)

    Hier mal meine Version von Aero:

    Spoiler anzeigen
    [autoit]

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

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

    Global $iWidth = 600
    Global $iHeight = 400

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

    Opt("MustDeclareVars", 1)
    Opt("GUIOnEventMode", 1)

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

    Global $hGui = GUICreate("Test", $iWidth, $iHeight, Default, Default, $WS_POPUP)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    _GDIPlus_Startup()
    Global $hDC = _WinAPI_GetDC($hGui)
    Global $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth, $iHeight)
    Global $hBmpTmp = _GDIPlus_BitmapCreateFromHBITMAP($hBMP)
    _WinAPI_DeleteObject($hBMP)
    $hBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBmpTmp)
    _GDIPlus_BitmapDispose($hBmpTmp)
    Global $hCDC = _WinAPI_CreateCompatibleDC($hDC)
    Global $hOBJ = _WinAPI_SelectObject($hCDC, $hBMP)
    Global $hGfxBuffer = _GDIPlus_GraphicsCreateFromHDC($hCDC)

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

    Global $iBlurW = Ceiling($iWidth * 0.4)
    Global $iBlurH = Ceiling($iHeight * 0.4)
    Global $hBmpBlur = _GDIPlus_BitmapCreateFromGraphics($iBlurW, $iBlurH, $hGfxBuffer)
    Global $hGfxBlur = _GDIPlus_ImageGetGraphicsContext($hBmpBlur)
    DllCall($ghGDIPDll, "uint", "GdipSetPixelOffsetMode", "hwnd", $hGfxBlur, "int", 2)
    DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "hwnd", $hGfxBlur, "int", 6)

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

    Global $hDC_Screen = _WinAPI_GetDC(0)

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

    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    GUIRegisterMsg($WM_ERASEBKGND, "WM_PAINT")
    GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED")
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    WinSetTrans($hGui, "", 0xFF)
    GUISetState()
    _SetGuiRoundCorners($hGui, 16, True, False, True, False)
    _RePaint()

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

    While 1
    Sleep(100)
    WEnd

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

    Func _RePaint()
    Local $aResult = DllCall("gdi32.dll", "hwnd", "GetCurrentObject", "hwnd", $hDC_Screen, "int", 7)
    Local $hBmpScreen = _GDIPlus_BitmapCreateFromHBITMAP($aResult[0])

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

    Local $tPoint = DllStructCreate("int X; int Y;")
    _WinAPI_ClientToScreen($hGui, $tPoint)

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

    Local $tRectF = _GDIPlus_RectFCreate(DllStructGetData($tPoint, 1), DllStructGetData($tPoint, 2), $iWidth, $iHeight)
    $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrushFromRectWithAngle", "ptr", DllStructGetPtr($tRectF), "uint", 0x60202040, "uint", 0xA0F0F0F0, "float", -60, "int", False, "int", 1, "int*", 0)
    Local $hBrush = $aResult[7]

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

    _GDIPlus_GraphicsDrawImageRectRect($hGfxBlur, $hBmpScreen, DllStructGetData($tPoint, 1), DllStructGetData($tPoint, 2), $iWidth, $iHeight, 0, 0, $iBlurW, $iBlurH)
    _GDIPlus_GraphicsDrawImageRect($hGfxBuffer, $hBmpBlur, 0, 0, $iWidth, $iHeight)
    _GDIPlus_GraphicsFillRect($hGfxBuffer, 0, 0, $iWidth, $iHeight, $hBrush)

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

    _GDIPlus_BitmapDispose($hBmpScreen)
    _GDIPlus_BrushDispose($hBrush)

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

    _WinAPI_BitBlt($hDC, 0, 0, $iWidth, $iHeight, $hCDC, 0, 0, 0x00CC0020)
    EndFunc ;==>_RePaint

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

    Func WM_WINDOWPOSCHANGED($hWnd, $iMsg, $StartWIndowPosaram, $lParam)
    _RePaint()
    Return "GUI_RUNDEFMSG"
    EndFunc ;==>WM_WINDOWPOSCHANGED

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

    Func WM_NCHITTEST($hWndGUI, $MsgID, $WParam, $lParam)
    If ($hWndGUI = $hGui) And ($MsgID = $WM_NCHITTEST) Then Return $HTCAPTION
    EndFunc ;==>WM_NCHITTEST

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

    Func WM_PAINT($hWnd, $uMsgm, $WParam, $lParam)
    _WinAPI_BitBlt($hDC, 0, 0, $iWidth, $iHeight, $hCDC, 0, 0, 0x00CC0020)
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_PAINT

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

    Func _Exit()
    _WinAPI_ReleaseDC(0, $hDC_Screen)
    _GDIPlus_GraphicsDispose($hGfxBlur)
    _GDIPlus_BitmapDispose($hBmpBlur)
    _GDIPlus_GraphicsDispose($hGfxBuffer)
    _WinAPI_SelectObject($hCDC, $hOBJ)
    _WinAPI_DeleteObject($hBMP)
    _WinAPI_DeleteDC($hCDC)
    _WinAPI_ReleaseDC($hGui, $hDC)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

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

    Func _SetGuiRoundCorners($hGui, $iEllipse, $iLeftUp = True, $iLeftDown = True, $iRightUp = True, $iRightDown = True)
    Local $hCornerRgn
    Local $aGuiSize = WinGetPos($hGui)
    Local $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $aGuiSize[2], $aGuiSize[3], $iEllipse, $iEllipse)
    If $iLeftUp = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn(0, 0, $aGuiSize[2] / 2, $aGuiSize[3] / 2)
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    If $iLeftDown = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn(0, $aGuiSize[3] / 2, $aGuiSize[2] / 2, $aGuiSize[3])
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    If $iRightUp = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn($aGuiSize[2] / 2, 0, $aGuiSize[2], $aGuiSize[3] / 2)
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    If $iRightDown = False Then
    $hCornerRgn = _WinAPI_CreateRectRgn($aGuiSize[2] / 2, $aGuiSize[3] / 2, $aGuiSize[2] - 1, $aGuiSize[3] - 1)
    _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR)
    _WinAPI_DeleteObject($hCornerRgn)
    EndIf
    _WinAPI_SetWindowRgn($hGui, $hRgn)
    EndFunc ;==>_SetGuiRoundCorners

    [/autoit]

    und ich nutze gleich die Gelegenheit nochmals BlackHole und Mauslupe zu posten :D

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <StructureConstants.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>

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

    If @OSBuild > 5999 Then Exit MsgBox(16, "Error", "Working on WinXP only", 30)

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

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

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

    Opt("MustDeclareVars", 1)

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

    Global $fArea = 0.3
    Global $iSize = 200

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

    Global $iWidth = @DesktopWidth
    Global $iHeight = @DesktopHeight

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

    _GDIPlus_Startup()
    Global $hGui = GUICreate("GDI+ Script by Eukalyptus", $iWidth, $iHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $WS_EX_TRANSPARENT), _WinAPI_GetDesktopWindow())

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

    Global $hDC = _WinAPI_GetDC($hGui)
    Global $hCDC = _WinAPI_CreateCompatibleDC($hDC)
    Global $hGfx = _GDIPlus_GraphicsCreateFromHDC($hDC)
    Global $hBmpSize = _GDIPlus_BitmapCreateFromGraphics($iSize, $iSize, $hGfx)
    Global $hGfxSize = _GDIPlus_ImageGetGraphicsContext($hBmpSize)
    _GDIPlus_GraphicsDispose($hGfx)

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

    Global $hBrush = _CreateBrush()

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

    Global $tSize = DllStructCreate($tagSIZE)
    Global $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $iWidth)
    DllStructSetData($tSize, "Y", $iHeight)
    Global $tSource = DllStructCreate($tagPOINT)
    Global $pSource = DllStructGetPtr($tSource)
    Global $tBlend = DllStructCreate($tagBLENDFUNCTION)
    Global $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", 0xFF)
    DllStructSetData($tBlend, "Format", 1)

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

    Global $hMod = _WinAPI_GetModuleHandle(0)
    Global $hProc = DllCallbackRegister("_MouseProc", "int", "int;ptr;ptr")
    Global $hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, DllCallbackGetPtr($hProc), $hMod, 0)

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

    GUISetState()

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

    While Sleep(10)
    WEnd

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

    Func _Draw($iMX, $iMY)
    Local $hCAP = _ScreenCapture_Capture("", $iMX, $iMY, $iMX + $iSize, $iMY + $iSize, False)
    Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hCAP)
    _WinAPI_DeleteObject($hCAP)

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

    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateTexture", "hwnd", $hBitmap, "int", 0, "int*", 0)
    Local $hTexture = $aResult[3]
    _GDIPlus_BitmapDispose($hBitmap)

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

    Local $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth, $iHeight)
    Local $hOBJ = _WinAPI_SelectObject($hCDC, $hBMP)
    Local $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hCDC)

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

    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iSize, $iSize, $hGraphics)
    Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "hwnd", $hContext, "int", 7)

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

    Local $hMatrix = _GDIPlus_MatrixCreate()
    Local $fScale
    Local $fTmp = 0

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

    For $i = 1 To Floor($iSize / 2) Step 2
    $fTmp = $i * ($iSize * $fArea) / ($iSize / 2) * 2.3
    $fScale = (($iSize - $fTmp) / ($iSize - $i * 2))

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

    DllCall($ghGDIPDll, "uint", "GdipSetMatrixElements", "hwnd", $hMatrix, "float", 1, "float", 0, "float", 0, "float", 1, "float", 0, "float", 0)
    _GDIPlus_MatrixTranslate($hMatrix, $iSize / 2, $iSize / 2)
    _GDIPlus_MatrixScale($hMatrix, $fScale, $fScale)
    _GDIPlus_MatrixTranslate($hMatrix, -$iSize / 2, -$iSize / 2)
    _GDIPlus_GraphicsSetTransform($hContext, $hMatrix)

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

    DllCall($ghGDIPDll, "int", "GdipFillEllipse", "handle", $hContext, "handle", $hTexture, "float", $i, "float", $i, "float", $iSize - $i * 2, "float", $iSize - $i * 2)
    Next

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

    DllCall($ghGDIPDll, "uint", "GdipResetWorldTransform", "hwnd", $hContext)
    _GDIPlus_GraphicsFillRect($hContext, 0, 0, $iSize, $iSize, $hBrush)

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

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, $iMX, $iMY)

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

    _GDIPlus_GraphicsDispose($hContext)
    _GDIPlus_BitmapDispose($hBitmap)

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_BrushDispose($hTexture)
    _GDIPlus_GraphicsDispose($hGraphics)

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

    _WinAPI_UpdateLayeredWindow($hGui, $hDC, 0, $pSize, $hCDC, $pSource, 0, $pBlend, $ULW_ALPHA)

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

    _WinAPI_SelectObject($hCDC, $hOBJ)
    _WinAPI_DeleteObject($hBMP)

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

    EndFunc ;==>_Draw

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

    Func _CreateBrush()
    Local $fTmp = $iSize * $fArea
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePath", "int", 0, "int*", 0)
    Local $hPath = $aResult[2]

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

    DllCall($ghGDIPDll, "uint", "GdipAddPathEllipse", "hwnd", $hPath, "float", $fTmp, "float", $fTmp, "float", $iSize - $fTmp * 2, "float", $iSize - $fTmp * 2)

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

    $aResult = DllCall($ghGDIPDll, "uint", "GdipCreatePathGradientFromPath", "hwnd", $hPath, "int*", 0)
    Local $hBrush = $aResult[2]
    DllCall($ghGDIPDll, "uint", "GdipSetPathGradientCenterColor", "hwnd", $hBrush, "uint", 0xFF000000)

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

    Local $aColor[2] = [1, 0x00000000]
    Local $tColor = DllStructCreate("uint")
    DllCall($ghGDIPDll, "uint", "GdipSetPathGradientSurroundColorsWithCount", "hwnd", $hBrush, "ptr", DllStructGetPtr($tColor), "int*", 1)
    DllCall($ghGDIPDll, "uint", "GdipSetPathGradientFocusScales", "hwnd", $hBrush, "float", 0.7, "float", 0.7)

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

    DllCall($ghGDIPDll, "uint", "GdipSetPathGradientGammaCorrection", "hwnd", $hBrush, "int", True)
    DllCall($ghGDIPDll, "uint", "GdipDeletePath", "hwnd", $hPath)

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

    Return $hBrush
    EndFunc ;==>_CreateBrush

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

    Func _MouseProc($nCode, $wParam, $lParam)
    If $nCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    Local $tStruct = DllStructCreate("int X;int Y;dword mouseData;dword flags;dword time;ulong_ptr dwExtraInfo", $lParam)
    _Draw(DllStructGetData($tStruct, 1) - ($iSize / 2), DllStructGetData($tStruct, 2) - ($iSize / 2))
    Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    EndFunc ;==>_MouseProc

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

    Func _Exit()
    _WinAPI_UnhookWindowsHookEx($hHook)
    DllCallbackFree($hProc)
    _WinAPI_DeleteDC($hCDC)
    _WinAPI_ReleaseDC($hGui, $hDC)
    _GDIPlus_BitmapDispose($hBmpSize)
    _GDIPlus_GraphicsDispose($hGfxSize)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

    [/autoit]
    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <ScreenCapture.au3>
    #include <StructureConstants.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>

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

    If @OSBuild > 5999 Then Exit MsgBox(16, "Error", "Working on WinXP only", 30)

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

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

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

    Opt("MustDeclareVars", 1)

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

    Global $iSize = 200
    Global $iSize_D2 = $iSize / 2

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

    Global $iWidth = @DesktopWidth
    Global $iHeight = @DesktopHeight

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

    Global Const $PI = ATan(1) * 4
    Global Const $PI_M2 = $PI * 2
    Global Const $PI_D2 = $PI / 2

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

    _GDIPlus_Startup()
    Global $hGui = GUICreate("GDI+ Script by Eukalyptus", $iWidth, $iHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $WS_EX_TRANSPARENT), _WinAPI_GetDesktopWindow())

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

    Global $hDC = _WinAPI_GetDC($hGui)
    Global $hCDC = _WinAPI_CreateCompatibleDC($hDC)
    Global $hGfx = _GDIPlus_GraphicsCreateFromHDC($hDC)
    Global $hBmpSize = _GDIPlus_BitmapCreateFromGraphics($iSize, $iSize, $hGfx)
    Global $hGfxSize = _GDIPlus_ImageGetGraphicsContext($hBmpSize)
    _GDIPlus_GraphicsDispose($hGfx)

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

    Global $tSize = DllStructCreate($tagSIZE)
    Global $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $iWidth)
    DllStructSetData($tSize, "Y", $iHeight)
    Global $tSource = DllStructCreate($tagPOINT)
    Global $pSource = DllStructGetPtr($tSource)
    Global $tBlend = DllStructCreate($tagBLENDFUNCTION)
    Global $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", 0xFF)
    DllStructSetData($tBlend, "Format", 1)

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

    Global $hMod = _WinAPI_GetModuleHandle(0)
    Global $hProc = DllCallbackRegister("_MouseProc", "int", "int;ptr;ptr")
    Global $hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, DllCallbackGetPtr($hProc), $hMod, 0)

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

    GUISetState()

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

    While Sleep(10)
    WEnd

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

    Func _Draw($iMX, $iMY)
    Local $hCAP = _ScreenCapture_Capture("", $iMX, $iMY, $iMX + $iSize, $iMY + $iSize, False)
    Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hCAP)
    _WinAPI_DeleteObject($hCAP)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateTexture", "hwnd", $hBitmap, "int", 0, "int*", 0)
    Local $hTexture = $aResult[3]
    _GDIPlus_BitmapDispose($hBitmap)

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

    Local $hBMP = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth, $iHeight)
    Local $hOBJ = _WinAPI_SelectObject($hCDC, $hBMP)
    Local $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hCDC)

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

    $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iSize, $iSize, $hGraphics)
    Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "hwnd", $hContext, "int", 7)

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

    Local $hMatrix = _GDIPlus_MatrixCreate()
    Local $fScale
    For $i = 1 To $iSize_D2 Step 2
    $fScale = ((Sin($i * $PI_M2 / $iSize - $PI_D2) + 1) / 2) * 0.4 + 1

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

    DllCall($ghGDIPDll, "uint", "GdipSetMatrixElements", "hwnd", $hMatrix, "float", 1, "float", 0, "float", 0, "float", 1, "float", 0, "float", 0)
    _GDIPlus_MatrixTranslate($hMatrix, $iSize_D2, $iSize_D2)
    _GDIPlus_MatrixScale($hMatrix, $fScale, $fScale)
    _GDIPlus_MatrixTranslate($hMatrix, -$iSize_D2, -$iSize_D2)
    _GDIPlus_GraphicsSetTransform($hContext, $hMatrix)

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

    DllCall($ghGDIPDll, "int", "GdipFillEllipse", "handle", $hContext, "handle", $hTexture, "float", $i, "float", $i, "float", $iSize - $i * 2, "float", $iSize - $i * 2)
    Next

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

    _GDIPlus_GraphicsDrawImage($hGraphics, $hBitmap, $iMX, $iMY)

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

    _GDIPlus_GraphicsDispose($hContext)
    _GDIPlus_BitmapDispose($hBitmap)

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_BrushDispose($hTexture)
    _GDIPlus_GraphicsDispose($hGraphics)

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

    _WinAPI_UpdateLayeredWindow($hGui, $hDC, 0, $pSize, $hCDC, $pSource, 0, $pBlend, $ULW_ALPHA)

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

    _WinAPI_SelectObject($hCDC, $hOBJ)
    _WinAPI_DeleteObject($hBMP)
    EndFunc ;==>_Draw

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

    Func _MouseProc($nCode, $wParam, $lParam)
    If $nCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    Local $tStruct = DllStructCreate("int X;int Y;dword mouseData;dword flags;dword time;ulong_ptr dwExtraInfo", $lParam)
    _Draw(DllStructGetData($tStruct, 1) - ($iSize / 2), DllStructGetData($tStruct, 2) - ($iSize / 2))
    Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    EndFunc ;==>_MouseProc

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

    Func _Exit()
    _WinAPI_UnhookWindowsHookEx($hHook)
    DllCallbackFree($hProc)
    _WinAPI_DeleteDC($hCDC)
    _WinAPI_ReleaseDC($hGui, $hDC)
    _GDIPlus_BitmapDispose($hBmpSize)
    _GDIPlus_GraphicsDispose($hGfxSize)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

    [/autoit]

    Schade eigentlich, dass die Scripte nur unter XP funktionieren :(

    E

  • Klasse! Hast das Skript richtig gut optimiert :thumbup:

    Das mit ClientToScreen() ist ja optimal, um die Position unabhängig vom Theme zu bekommen! :D


    Wie gesagt, verwende ich WinXP nur noch sehr selten und der Aero Effekt ab Vista sieht echt klasse aus, zumal Win7 richtig stabil und schnell läuft.

    Diesen Effekt hätte man vor 4 Jahren gut gebrauchen können, aber heute ist das "nur" noch eine Demo.


    BlackHole und Mauslupe sind super Effekte :thumbup:


    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

    Einmal editiert, zuletzt von UEZ (1. Dezember 2011 um 11:38)

  • Klasse Sache !
    Das hab ich auch schonmal gemacht, da bin ich am Blur gescheitert.
    Auch wenn ich meine GUI´s eigentlich immer individuell gestalte ist das doch mal was schönes zum Spaß haben auf XP.

    Da ist doch der unwissende XP nutzer überrascht, wenn ein Fenster auf ein Mal einen Aero Effect hat...^^

    lg
    M

  • Das Ding läuft auch unter Vista+, wenn Aero abgeschaltet ist (macht das Skript)!

    eukalyptus: gleiches gilt auch für deine beiden Skripte (BlackHole und Mauslupe)!

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Coole Sache das, wobei meine Frau fragte, wer diesen Effekt überhaupt braucht....
    Ich darauf:"Grafischer (langsamer) Schnickschnack, um neue (schnelle) Hardware verkaufen zu können!"
    Sie:"Ist dieses AERO beim neuen Windows abzuschalten?" (wir bekommen bald 2 neue Win7/Win8-Laptops)
    Ich:"Na klar!"
    Sie:"Das erste Fenster mit diesem wischiwaschi, und es wird XP draufgespielt, Ende der Diskussion.....(überlegt kurz)....was kosten die Rechner ohne Betriebssystem weniger?"
    (Abgang der Darsteller)

    ;( umpft :huh:

    Ich werde mich trotzdem mal am Wochenende hinsetzen, um den "Blur" von 25ms auf unter eine halbe Millisekunde zu drücken....bissl was geht immer....aber verratet das nicht meiner Frau^^


  • Ich werde mich trotzdem mal am Wochenende hinsetzen, um den "Blur" von 25ms auf unter eine halbe Millisekunde zu drücken....bissl was geht immer....aber verratet das nicht meiner Frau^^

    Und wo ist die Version? :P Oder hat's deine Frau mitbekommen und dir eine Strafe verpasst? ;)

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯