Hallo
Gibt es eine Möglichkeit das Titel-Label im folgenden Skript transparent über die Child-Gui zu legen?
Spoiler anzeigen
#Include <Color.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('PixelCoordMode', 0)
Opt("GUIOnEventMode", 1)
Const $WS_EX_COMPOSITED = 0x2000000
Global $title = "Funkey's Moving Transition ;-)"
Global $hGui = GUICreate($title, 400, 500, -1, -1, BitOR($WS_POPUP, $WS_DLGFRAME), $WS_EX_COMPOSITED)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlCreateButton('0', 348, 2, 16, 16, 0x0800) ; _
GUICtrlSetOnEvent(-1, '_Minimize')
GUICtrlSetTip(-1, 'Minimieren')
GUICtrlSetFont(-1, 8, 0, 0, 'Marlett')
GUICtrlCreateButton('1', 364, 2, 16, 16, 0x0800) ;
GUICtrlSetOnEvent(-1, '_Maximize')
GUICtrlSetTip(-1, 'Maximieren')
GUICtrlSetFont(-1, 8, 0, 0, 'Marlett')
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateButton('r', 382, 2, 16, 16, 0x0800) ; x
GUICtrlSetOnEvent(-1, '_Exit')
GUICtrlSetTip(-1, 'Schließen')
GUICtrlSetFont(-1, 8, 0, 0, 'Marlett')
GUICtrlCreateLabel(" " & $title, 20, 2, 200, 16, 0x4000200, 0x00100000)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 9.8, 400, 0, 'MS Sans Serif')
Global $hChild = GUICreate('Child', 1600, 20, 0, 0, $WS_CHILD, -1, $hGui)
Global $Ctrl_Grafik = _CreateColorTransition(0, 0, 1600, 20, 0xFF0000, 0xFFFF00, 1, 4)
GUISetState()
GUISwitch($hGUI)
GUISetState()
AdlibEnable('_RotateCaption', 50)
[/autoit] [autoit][/autoit] [autoit]While 1
Sleep(10000)
WEnd
Func _RotateCaption()
Local $aPosC = WinGetPos($hChild), $aPosG = WinGetPos($hGui)
If $aPosC[0] - $aPosG[0] <= -800 Then
WinMove($hChild, '', -5, 0)
Else
WinMove($hChild, '', $aPosC[0] - $aPosG[0] - 5, 0)
EndIf
EndFunc
Func _Minimize()
GUISetState(@SW_MINIMIZE)
EndFunc
Func _Maximize()
GUISetState(@SW_MAXIMIZE)
EndFunc
Func _Exit()
Exit
EndFunc ;==>_Exit
Func _CreateColorTransition($iPosx, $iPosy, $iWidth, $iHeight, $nColorStart, $nColorEnd, $iAlignment = 0, $iWaveFaktor = 1)
; funkey
Local $startRot, $startGruen, $startBlau, $endRot, $endGruen, $endBlau, $Color
Local $ColorOffsetRot, $ColorOffsetGruen, $ColorOffsetBlau, $Grafik
$startRot = _ColorGetRed($nColorStart)
$startGruen = _ColorGetGreen($nColorStart)
$startBlau = _ColorGetBlue($nColorStart)
$endRot = _ColorGetRed($nColorEnd)
$endGruen = _ColorGetGreen($nColorEnd)
$endBlau = _ColorGetBlue($nColorEnd)
$Grafik = GUICtrlCreateGraphic($iPosx, $iPosy, $iWidth, $iHeight, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
$iHeight += $iWaveFaktor - Mod($iHeight, $iWaveFaktor)
Switch $iAlignment
Case 0
$ColorOffsetRot = ($endRot - $startRot) / ($iHeight / $iWaveFaktor)
$ColorOffsetGruen = ($endGruen - $startGruen) / ($iHeight / $iWaveFaktor)
$ColorOffsetBlau = ($endBlau - $startBlau) / ($iHeight / $iWaveFaktor)
Switch Mod($iWaveFaktor, 2)
Case 0
For $w = 1 To $iWaveFaktor - 1 Step 2
For $i = ($w - 1) * ($iHeight / $iWaveFaktor) To ($w) * ($iHeight / $iWaveFaktor) - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1 - (($w - 1) * $iHeight / $iWaveFaktor)), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1 - (($w - 1) * $iHeight / $iWaveFaktor)), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1 - (($w - 1) * $iHeight / $iWaveFaktor)), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
For $i = $w * ($iHeight / $iWaveFaktor) To ($w + 1) * ($iHeight / $iWaveFaktor) - 1
$Color = '0x' & Hex($endRot - $ColorOffsetRot * ($i - ($w * $iHeight / $iWaveFaktor) + 1), 2) & _
Hex($endGruen - $ColorOffsetGruen * ($i - ($w * $iHeight / $iWaveFaktor) + 1), 2) & _
Hex($endBlau - $ColorOffsetBlau * ($i - ($w * $iHeight / $iWaveFaktor) + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
Next
Case 1
For $i = 0 To $iHeight - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
EndSwitch
Case Else
$ColorOffsetRot = ($endRot - $startRot) / ($iWidth / $iWaveFaktor)
$ColorOffsetGruen = ($endGruen - $startGruen) / ($iWidth / $iWaveFaktor)
$ColorOffsetBlau = ($endBlau - $startBlau) / ($iWidth / $iWaveFaktor)
Switch Mod($iWaveFaktor, 2)
Case 0
For $w = 1 To $iWaveFaktor - 1 Step 2
For $i = ($w - 1) * ($iWidth / $iWaveFaktor) To ($w) * ($iWidth / $iWaveFaktor) - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1 - (($w - 1) * $iWidth / $iWaveFaktor)), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1 - (($w - 1) * $iWidth / $iWaveFaktor)), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1 - (($w - 1) * $iWidth / $iWaveFaktor)), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
Next
For $i = $w * ($iWidth / $iWaveFaktor) To ($w + 1) * ($iWidth / $iWaveFaktor) - 1
$Color = '0x' & Hex($endRot - $ColorOffsetRot * ($i - ($w * $iWidth / $iWaveFaktor) + 1), 2) & _
Hex($endGruen - $ColorOffsetGruen * ($i - ($w * $iWidth / $iWaveFaktor) + 1), 2) & _
Hex($endBlau - $ColorOffsetBlau * ($i - ($w * $iWidth / $iWaveFaktor) + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $i, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $i, $iHeight)
Next
Next
Case 1
For $i = 0 To $iHeight - 1
$Color = '0x' & Hex($startRot + $ColorOffsetRot * ($i + 1), 2) & _
Hex($startGruen + $ColorOffsetGruen * ($i + 1), 2) & _
Hex($startBlau + $ColorOffsetBlau * ($i + 1), 2)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Color)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, $i)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, $iWidth, $i)
Next
EndSwitch
EndSwitch
Return $Grafik
EndFunc ;==>_CreateColorTransition