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!
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
I know many newbies search for this feature.
I decided to share this piece of code with everyone.
Basically its a "splash screen" that has a transparent image.
In a nutshell - Gui with a transparent gif.
Splash Screen GUI.zip
Hello everyone !
I'm making a little password generator with save function.
And i would like to set a line limit at 25.
For my script, the user have to enter a name in "$input1" and click on the button "$btn_save" to display it in the editbox "$edit1".
The user can't edit himself because the edit box have $ES_READONLY
If someone know how, Thanks you !
PS: I've already looked in the help and didn't find anything..
I want to show or hide a edit control depending if a radio button is checked or not.The following Autoit code appears semantically ok but not working.Can anyone please help?
While 1 $nMsg = GUIGetMsg() $isradioChk=GUICtrlRead($radio_AbsP);checked=1,not checked=4 Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $isradioChk If $isradioChk<==1 Then GUICtrlSetState($edit_AbsP,$GUI_SHOW) GUICtrlSetState($edit_RelP,$GUI_HIDE) Else GUICtrlSetState($edit_AbsP,$GUI_HIDE) GUICtrlSetState($edit_RelP,$GUI_SHOW) EndIf Case $usrPrefs EndSwitch WEnd