I'm looking for a way to do a Video Overlay GUI or something like that. The idea is to create a GUI which plays a video loop (with transparency/alpha channel) in front of an other GUI. Before you asking why - because I don't believe that GDIPlus can do it out of the box. My skillset for that kind of graphical things isn't good enough to do that, but here are some specialist like @UEZ maybe who can help.
Example alpha channel video (visualized as animated *.gif):
I tried to do the light rays effect directly with GDIPlus, but honestly that's a bit too difficult for me. I would be very glad and grateful if there are some suggestions, ideas or recommendations.
Code for the Video play:
Example video "End.mpeg":
The next challenge is that the overlay GUI should be not clickable. If I hover over the overlay area, I want to have the possibility to control the GUI or what ever, in the background. But if there is any chance to make it with GDIPlus as a Video Overlay for light rays, I would prefer that approach instead of my crazy work-around idea.
Thanks for any suggestion - I'm grateful!
Hi, I am stuck on a GUI problem and would like your help to solve it.
I am trying to automate the SoundWire Server app to match my current system volume level while it is minimized to the notification area (so no clicking or stealing focus),
I can already get the handle and alter the tracker position by sending a WM_SETPOS message, but somehow the actual volume is not changed: I think I need to do something else to trigger the event handler for the value change and propagate it correctly.
This is the control summary from Au3 info:
>>>> Window <<<< Title: SoundWire Server Class: #32770 Position: 441, 218 Size: 566, 429 Style: 0x94CA00C4 ExStyle: 0x00050101 Handle: 0x0000000000510E12 >>>> Control <<<< Class: msctls_trackbar32 Instance: 4 ClassnameNN: msctls_trackbar324 Name: Advanced (Class): [CLASS:msctls_trackbar32; INSTANCE:4] ID: 6002 Text: Position: 51, 222 Size: 47, 126 ControlClick Coords: 1, 101 Style: 0x5001000A ExStyle: 0x00000000 Handle: 0x00000000001234C8 >>>> Mouse <<<< Position: 496, 567 Cursor ID: 2 Color: 0xF0F0F0 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Default multimedia device Tray on Start Static Server Address: 192.168.1.8 Status: Connected to B9K~OP3 Audio Output Audio Input Level Record to File Input Select: 44.1 kHz Minimize to Master Volume Mute >>>> Hidden Text <<<< Slider2 Mute OK Cancel Label Balance Slider1 Volume Front L/R Fr C/LFE Side L/R Back L/R
I am attaching the program in question so you don't have to install it (i don't know if it is portable enough, tough):
Thanks in advance and I hope I didn't post in the wrong section
I am trying to get an image showing through a edit box. I am only successful in making the edit box totally transparent
#include-once #include <GUIConstants.au3> #include <GDIPlus.au3> #include <WinAPISys.au3> #include <colorconstants.au3> ;WS_EX_TRANSPARENT $gui = GUICreate("", 1000, 800, -1, -1, -1 , $WS_EX_LAYERED) ; use layered to get _winapi_setlay... to work $pic = GUICtrlCreatePic("c:\Program Files (x86)\AutoIt3\Examples\GUI\Merlin.gif", 0,0,1000, 800) GUICtrlSetState(-1, $GUI_DISABLE) $edit = GUICtrlCreateEdit("First line" & @CRLF, 176, 32,200,600) GUICtrlSetBkColor(-1,$COLOR_YELLOW) _WinAPI_SetLayeredWindowAttributes($gui,$COLOR_YELLOW,199) ; 199 is alpha (transparency level) GUISetState(@SW_SHOW,$gui) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else EndSelect WEnd Exit Func Terminate() exit(0) EndFunc So I am making the edit box's background yellow then using the _WINAPI_SetLayeredWIndowAttributes command to make the yellow disappear (which it does), but the alpha level is supposed to give a bit of opaqueness to it, but its not, just making it totally transparent. The alpha level is in fact affecting the window itself and not the edit box. I only want the edit box to be partially transparent.
I am searching for a way to display a transparent image (or Icon) over an Button. And the image should always stay on top.
Here is what i have so far:
At script start the picture is over the button..but if you move the mouse over the button it overlaps the image.
And if i add $GUI_ONTOP to the picture, the transparency is gone
Maybe someone has an idea..
Thanks in advance!
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WinAPIIcons.au3> #include <WinAPIShellEx.au3> GUICreate("GUI", 300, 300) $hbutton = GUICtrlCreateButton("This is a button", 20, 40, 150, 30,$WS_CLIPSIBLINGS) $hpic = GUICtrlCreatePic("", 10, 10, 128, 128) _SetIconAlpha($hpic,"shell32.dll", 12,128,128) GUICtrlSetState(-1, $GUI_DISABLE) ;~ GUICtrlSetState(-1,$GUI_ONTOP) ;If you uncomment this..the picture is on top...but the transparency is gone :( GUISetState() While 1 $Msg = GUIGetMsg() If $Msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Func _SetIconAlpha($hWnd, $sIcon, $iIndex, $iWidth, $iHeight) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) If $hWnd = 0 Then Return SetError(1, 0, 0) EndIf EndIf If $iIndex <> 0 Then $iIndex = $iIndex - 1 Local $hIcon = _WinAPI_ShellExtractIcon($sIcon, $iIndex, $iWidth, $iHeight) If $hIcon = 0 Then Return SetError(1, 0, 0) EndIf Local $hBitmap, $hObj, $hDC, $hMem, $hSv $hDC = _WinAPI_GetDC($hWnd) $hMem = _WinAPI_CreateCompatibleDC($hDC) $hBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iWidth, $iHeight) $hSv = _WinAPI_SelectObject($hMem, $hBitmap) _WinAPI_DrawIconEx($hMem, 0, 0, $hIcon, $iWidth, $iHeight, 0, 0, 2) _WinAPI_ReleaseDC($hWnd, $hDC) _WinAPI_SelectObject($hMem, $hSv) _WinAPI_DeleteDC($hMem) _WinAPI_DestroyIcon($hIcon) _WinAPI_DeleteObject(_SendMessage($hWnd, 0x0172, 0, 0)) _SendMessage($hWnd, 0x0172, 0, $hBitmap) $hObj = _SendMessage($hWnd, 0x0173) If $hObj <> $hBitmap Then _WinAPI_DeleteObject($hBitmap) EndIf Return 1 EndFunc ;==>_SetIconAlpha