Donno if this helps or not, not related to controls, but may give you some ideas.
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GDIPlus.au3>
#include <String.au3>
#include <GuiMenu.au3>
#include <Misc.au3>
Global Const $width = 640
Global Const $height = 480
Global $graphics, $backbuffer, $bitmap, $Pen
Global $brush_color, $hFormat, $tLayout
Global $ScreenDc, $dc, $tSize, $pSize, $tSource, $pSource, $tBlend, $pBlend, $tPoint, $pPoint, $gdibitmap
Global $title = "From GDI+ Code by : UEZ!"
Global $hGUI, $hBrush
Global $iX = 0, $iY = 0, $Col, $hPen, $iWidth = 100, $iHeight =100
Global $sc_hBrush, $sc_hFormat, $sc_hFamily, $sc_hFont, $sc_text_color, $text_scroller, $sc_tLayout, $sc_pen, $sc_brush
Global $letter_distance, $x, $y, $lenght, $end, $scroller_length, $sc_k
Global $pColor = 0xFF0000F0
Global $dot_k = $Width
Global $Trans, $Size
Global Const $sc_font_size = 48
$sc_text = "#*** |||| __Transparent Text Srcoller with Clock__ |||| ***#"
Opt("GUIOnEventMode", 1)
Opt("MouseCoordMode" ,0)
$GUI= GUICreate($title, $width, $height, -1, -1, 0, $WS_EX_LAYERED + $WS_EX_TOPMOST) ;Window Must be Layered for Transparency
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
_GDIPlus_Startup()
$graphics = _GDIPlus_GraphicsCreateFromHWND($GUI)
$bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics)
$backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
_GDIPlus_GraphicsSetSmoothingMode($backbuffer, 2)
$sc_hBrush = _GDIPlus_BrushCreateSolid ()
$sc_hPen = _GDIPlus_PenCreate($pColor, 1)
; == For transparency ==
$ScreenDc = _WinAPI_GetDC($GUI)
$gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap)
$dc = _WinAPI_CreateCompatibleDC($ScreenDc)
_WinAPI_SelectObject($dc, $gdibitmap)
; == _WinAPI_UpdateLayeredWindow parameters ==
$tSize = DllStructCreate($tagSIZE)
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", $width)
DllStructSetData($tSize, "Y", $height)
$tSource = DllStructCreate($tagPOINT)
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate($tagBLENDFUNCTION)
$pBlend = DllStructGetPtr($tBlend)
Global $alpha = 200
Global $alpha_steps = 5
DllStructSetData($tBlend, "Alpha", $alpha)
DllStructSetData($tBlend, "Format", 1)
$tPoint = DllStructCreate($tagPOINT)
$pPoint = DllStructGetPtr($tPoint)
DllStructSetData($tPoint, "X", 0)
DllStructSetData($tPoint, "Y", 0)
;===============================================
GUISetState()
GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") ;Drag Window
GUIRegisterMsg($WM_MOUSEWHEEL, "WM_MOUSEWHEEL") ;Adjust Trans
;Setup Scroll Font
$sc_text_color = 0xFF6209D6
$sc_htextBrush = _GDIPlus_BrushCreateSolid($sc_text_color)
$sc_hFormat = _GDIPlus_StringFormatCreate()
$sc_hFamily = _GDIPlus_FontFamilyCreate("Arial")
$sc_hFont = _GDIPlus_FontCreate($sc_hFamily, $sc_font_size, 2)
$sc_pen = _GDIPlus_PenCreate(0)
$sc_brush = _GDIPlus_BrushCreateSolid(0)
$tLayout = _GDIPlus_RectFCreate(0, 0)
;Text Ini
$sc_letter_distance = $sc_font_size
$sc_length = $sc_font_size * 1.666 * 0.36
$sc_k = $width
$end = 0
$scroller_length = StringLen($sc_text) * $sc_length
$sc_FontY = $Height - $height/4 + 40
;Time init
$Time_hBrush = _GDIPlus_BrushCreateSolid(0xFF008080)
$Time_hFormat = _GDIPlus_StringFormatCreate()
$Time_hFamily = _GDIPlus_FontFamilyCreate("Verdana")
$Time_hFont = _GDIPlus_FontCreate ($Time_hFamily, 48, 3)
$Time_hLayout = _GDIPlus_RectFCreate(0, 0, $Width, 80)
Do
_GDIPlus_GraphicsClear($backbuffer, 0x00000000)
; This is where you do your animation/ draw stuff :-)
DrawCorners
()
DrawTime
()
DrawDot
()
ScrollText
()
;~ _GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height)
; This is used for the transperancy instead of _GDIPlus_GraphicsDrawImageRect
$gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap)
_WinAPI_SelectObject($dc, $gdibitmap)
_WinAPI_UpdateLayeredWindow($GUI, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, 2)
_WinAPI_DeleteObject($gdibitmap)
Until False * Not Sleep(30)
; Draw the digital time
Func DrawTime
()
Local $sString, $aSize
$sString = StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC)
$aSize = _GDIPlus_GraphicsMeasureString($Backbuffer, $sString, $Time_hFont, $Time_hLayout, $Time_hFormat)
DllStructSetData($Time_hLayout, "X", $Width/2 - (DllStructGetData($aSize[0], "Width") / 2)) ; $Width - String length/2
DllStructSetData($Time_hLayout, "Y", 0) ; Clock at top
; DllStructSetData($Time_hLayout, "Y", $Height/2 - (DllStructGetData($aSize[0], "Height") / 2)) ; Clock in middle
_GDIPlus_GraphicsDrawStringEx($BackBuffer, $sString, $Time_hFont, $Time_hLayout, $Time_hFormat, $Time_hBrush)
EndFunc
; ================ SCROLL TEXT ====================
Func ScrollText
()
$sc_FontX = $sc_k + $sc_letter_distance
DllStructSetData($tLayout, "x", $sc_FontX)
DllStructSetData($tLayout, "y", $sc_FontY)
_GDIPlus_GraphicsDrawStringEx($BackBuffer, $sc_text, $sc_hFont, $tLayout, $sc_hFormat, $sc_htextBrush)
$sc_k -= 5
If -$scroller_length >= $sc_k Then
$sc_k = $Width
EndIf
EndFunc
; == Draw Corners ==
Func DrawCorners
()
Local $Lgth = 20
$hPen1 = _GDIPlus_PenCreate(0xFF0000AA, 10)
;Top Right
_GDIPlus_GraphicsDrawLine($backBuffer, $Width, 0, $Width - $Lgth, 0, $hPen1)
_GDIPlus_GraphicsDrawLine($backBuffer, $Width, 0, $Width , $Lgth, $hPen1)
;Top Left
_GDIPlus_GraphicsDrawLine($backBuffer, 0, 0, 0, $Lgth, $hPen1)
_GDIPlus_GraphicsDrawLine($backBuffer, 0, 0, $Lgth, 0, $hPen1)
;Bottom Right
_GDIPlus_GraphicsDrawLine($backBuffer, $Width, $Height, $Width, $Height - $Lgth, $hPen1)
_GDIPlus_GraphicsDrawLine($backBuffer, $Width, $Height, $Width - $Lgth, $Height, $hPen1)
;Bottom Left
_GDIPlus_GraphicsDrawLine($backBuffer, 0, $Height, 0, $Height - $Lgth, $hPen1)
_GDIPlus_GraphicsDrawLine($backBuffer, 0, $Height, $Lgth , $Height, $hPen1)
_GDIPlus_PenDispose($hPen1)
EndFunc
Func DrawDot
()
$dot_k -= 5
If $Dot_k <= -20 Then $dot_k = $Width
_GDIPlus_GraphicsFillEllipse($backBuffer, $Dot_k, $Height/2 -20 ,40, 40) ; Draw a Dot and move it
EndFunc
; ============= Handle the WM_NCHITTEST message so our window can be dragged ===============
Func WM
_NCHITTEST
($hWnd, $iMsg, $iwParam, $ilParam)
Local $hMenu, $Win, $WinX, $WinY, $mX, $mY
if $hWnD = $GUI and _IsPressed (01) then Return $HTCAPTION
EndFunc
#
;======================================================================
; MouseWheel for Win Trans
Func WM
_MOUSEWHEEL
($hWnd, $iMsg, $wParam, $lParam)
Local $mouseData, $n1
$mouseData = _WinAPI_HiWord($wParam)
Select
;Case $wParam = $WM_MOUSEWHEEL And WinActive($GUI)
;WM_MOUSEWHEEL = 0x020A
Case WinActive($GUI)
If $mouseData > 0 Then ;wheel up
If $alpha + $alpha_steps <= 512 Then $alpha += $alpha_steps
Switch $alpha
Case 0 To 255
DllStructSetData($tBlend, "Alpha", $alpha) ; Set Alpha (Transparency) Level
DllStructSetData($tBlend, "Format", 1)
Case 256 To 512
DllStructSetData($tBlend, "Alpha", $alpha - 256)
DllStructSetData($tBlend, "Format", 0)
EndSwitch
Else ;wheel down
If $alpha - $alpha_steps > 0 Then $alpha -= $alpha_steps
Switch $alpha
Case 0 To 255
DllStructSetData($tBlend, "Alpha", $alpha) ;wheel up
DllStructSetData($tBlend, "Format", 1)
Case 256 To 512
DllStructSetData($tBlend, "Alpha", $alpha - 256) ;wheel up
DllStructSetData($tBlend, "Format", 0)
EndSwitch
EndIf
ConsoleWrite($alpha & @CRLF)
EndSelect
EndFunc ;==>WM_MOUSEWHEEL
Func Close
()
_WinAPI_DeleteDC($dc)
_WinAPI_ReleaseDC($GUI, $ScreenDc)
_GDIPlus_FontDispose($SC_hFont)
_GDIPlus_FontFamilyDispose($SC_hFamily)
_GDIPlus_StringFormatDispose($SC_hFormat)
_GDIPlus_GraphicsDispose($backbuffer)
_GDIPlus_BitmapDispose($bitmap)
_GDIPlus_GraphicsDispose($graphics)
_GDIPlus_FontDispose ($Time_hFont )
_GDIPlus_FontFamilyDispose ($Time_hFamily)
_GDIPlus_StringFormatDispose($Time_hFormat)
_GDIPlus_BrushDispose ($Time_hBrush)
_GDIPlus_Shutdown()
WinClose($GUI)
Exit
EndFunc ;==>Close