This seems to be a little better - based on a script by UEZ
#include <WindowsConstants.au3>
#include <WinApi.au3>
#include <GDIPlus.au3>
_GDIPlus_Startup()
; Create GUI
Local $hGUI = GUICreate('Test', 500, 300, -1,-1,$WS_POPUP, $WS_EX_LAYERED)
GUISetBkColor(0xABCDEF)
Local $idPic = GUICtrlCreatePic('', 0, 0, 500, 300)
Local $hPic = GUICtrlGetHandle($idPic)
Local $hGDIBmp = _GDIPlus_CreateBitmapRoundCornerRect()
_WinAPI_DeleteObject(GUICtrlSendMsg($idPic, 0x0172, $IMAGE_BITMAP, $hGDIBmp))
_WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF, 255)
GUISetState(@SW_SHOW)
Do
Until GUIGetMsg() = -3
_WinAPI_DeleteObject($hGDIBmp)
_GDIPlus_Shutdown()
Func _GDIPlus_CreateBitmapRoundCornerRect($iW = 500, $iH = 300, $iColorBg = 0xFF505050, $iColorBorder = 0xFF505050, $iRadius = 15, $bGDIBmp = 1)
Local Const $iX = 0, $iY = 0, $iPenSize = 1
Local Const $iWidth = $iW - $iPenSize, $iHeight = $iH - $iPenSize
Local Const $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH)
Local Const $hCtxt = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hCtxt, $GDIP_SMOOTHINGMODE_HIGHQUALITY)
_GDIPlus_GraphicsSetTextRenderingHint($hCtxt, $GDIP_TEXTRENDERINGHINT_ANTIALIASGRIDFIT)
Local Const $hPath = _GDIPlus_PathCreate()
_GDIPlus_PathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY, $iRadius * 2, $iRadius * 2, 270, 90)
_GDIPlus_PathAddArc($hPath, $iX + $iWidth - ($iRadius * 2), $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 0, 90)
_GDIPlus_PathAddArc($hPath, $iX, $iY + $iHeight - ($iRadius * 2), $iRadius * 2, $iRadius * 2, 90, 90)
_GDIPlus_PathAddArc($hPath, $iX, $iY, $iRadius * 2, $iRadius * 2, 180, 90)
_GDIPlus_PathCloseFigure($hPath)
Local Const $hBrush = _GDIPlus_BrushCreateSolid($iColorBg)
_GDIPlus_GraphicsFillPath($hCtxt, $hPath, $hBrush)
Local Const $hPen = _GDIPlus_PenCreate($iColorBorder, $iPenSize)
_GDIPlus_GraphicsDrawPath($hCtxt, $hPath, $hPen)
_GDIPlus_PathDispose($hPath)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hCtxt)
If $bGDIBmp Then
Local $hGDIBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
_GDIPlus_BitmapDispose($hBitmap)
Return $hGDIBmp
EndIf
Return $hBitmap
EndFunc