Rex

Transparent gui, while using animated gif

4 posts in this topic

Hi

I'm trying to create a loading pop gui for my app.

But I'm having problems with transparency

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <_GUIResourcePic.au3> ; https://www.autoitscript.com/forum/topic/100167-_guiresourcepicau3-udf-supports-gif-animation-using-gdi/?page=1
#include <WindowsConstants.au3>
#include <ResourcesEx.au3>; https://www.autoitscript.com/forum/topic/162499-resourcesex-udf/?page=1
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$hLoading = GUICreate("Loading", 64, 64, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $WS_EX_TRANSPARENT))
GUISetOnEvent($GUI_EVENT_CLOSE, "hLoadingClose")
;~ $idPic_1 = GUICtrlCreatePic("Z:\Loading.gif", 0, 0, 128, 128)
_GUICtrlPic_Create(_Load(), 0, 0, 0, 0, -1, $GIS_EX_CTRLSNDRENDER)
;~  GUICtrlCreateLabel("From binary image!", 0, 370, 240, 60)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;~  GUICtrlSetFont(-1, 18)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func hLoadingClose()
Exit
EndFunc

Func _Load($bSaveBinary = False, $sSavePath = @ScriptDir)
    Local $Base64String
    $Base64String &= 'R0lGODlhQABAANU7AAwKDOXk5RASELW0tYSDhP7+/h8hH/v6+21rbRsZG6+wr////yooKv39/cXExebn5vj4+Pz8/HBxcEpLSuDf4I+Oj9vc2/n5+Tw+PC4wLoeIh87Pzvv7+/X19bi5uJKTkvLy8uvs662rrdrZ2lRSVOrp6mFfYfb39sfIx728vTg3OL/Av+7u7u/w7wQGBCQmJHRydJyanDQyNExOTGxubAwODBwaHCwqLGxqbBQWFAQCBP///wAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBwA7ACwAAAAAQABAAAAG/8CdcEgsGo/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UgFBnoGBUoNHxgqH6JSC42HDIRHLBlsGS1KB6xiDBdSFJNiFEkFKQQEHqlJH3oVUgO+OgpwuGMJzM4DcJ90BlIWzhZwFXoaqtmgr2cX0gYHU5iawHENFRkZH29TD+oPlnAFgCIUzvEbSLCgwYMIEypcWOTAiBG7GD55MCGTDgATOElc4sAiGwAONiZ54JHOpoUFjhkh4WxCwgYSAACQ0MDIiZKaTiA0JIZPkf9eznR8MxihJAAORboFHVqQg1GkRDrgNNkBIQI2iYxMaJkwAgKZCKBemioGALyXNZN01LRC'
    $Base64String &= 'pJIAGCwCwKDRrZIOD6va3cu3r98mKf8egVAh7twKEAQLQbGGjQAUggeQvQitL4jJZUH0JRBUB4E7IcxMaexLQJyvALJCOYB5DAB2DQeYEADAxADYSdxdrOuEdefXRTaQFiNgg5IScvdFEdDZNBECkwF8ToJaNRQNnacLkewMwLWRyqVc7q5ZCITWZSMqUhC98vbOYr5bcsCcjoCQRLbCJ0EQggYVMmWgQWJFDOfLNgY1kNYR9XVGjV36dcafXQrA98xe5/1GIIXoubcQF3STSCfQXhu4oIcLxsERBAA7'
    Local Const $bString = Binary(_WinAPI_Base64Decode($Base64String))
    If $bSaveBinary Then
        Local Const $hFile = FileOpen($sSavePath & "\Loading.gif", 18)
        If @error Then Return SetError(1, 0, 0)
        FileWrite($hFile, $bString)
        FileClose($hFile)
    EndIf
    Return $bString
EndFunc   ;==>_Base64String

Func _WinAPI_Base64Decode($sB64String)
    Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0)
    If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "")
    Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]")
    $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0)
    If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "")
    Return DllStructGetData($bBuffer, 1)
EndFunc   ;==>_WinAPI_Base64Decode

The animation is working swell, and is transparent but, the gui isn't :( I tried to add $WS_EX_LAYERED to EXstyle but that ended up with an invisible gui :o

Could any one point me in the right direction on how to make this work?

 

Cheers

/Rex

Share this post


Link to post
Share on other sites



Try this:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include "_GUIResourcePic.au3" ; https://www.autoitscript.com/forum/topic/100167-_guiresourcepicau3-udf-supports-gif-animation-using-gdi/?page=1
#include <WindowsConstants.au3>
#include <ResourcesEx.au3>; https://www.autoitscript.com/forum/topic/162499-resourcesex-udf/?page=1
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$hLoading = GUICreate("Loading", 64, 64, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $WS_EX_LAYERED))
GUISetOnEvent($GUI_EVENT_CLOSE, "hLoadingClose")
;~ $idPic_1 = GUICtrlCreatePic("Z:\Loading.gif", 0, 0, 128, 128)
$hAnim = _GUICtrlPic_Create(_Load(), 0, 0, 0, 0, -1, $GIS_EX_CTRLSNDRENDER)
;~  GUICtrlCreateLabel("From binary image!", 0, 370, 240, 60)
GUISetBkColor(345)
_WinAPI_SetLayeredWindowAttributes($hLoading, 345)

;~  GUICtrlSetFont(-1, 18)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    Sleep(100)
WEnd

Func hLoadingClose()
    _GUICtrlPic_SetState($hAnim, $GUI_GIFSTOP)
    _GUICtrlPic_Release($hAnim)
    GUIDelete($hLoading)
    Exit
EndFunc

Func _Load($bSaveBinary = False, $sSavePath = @ScriptDir)
    Local $Base64String
    $Base64String &= 'R0lGODlhQABAANU7AAwKDOXk5RASELW0tYSDhP7+/h8hH/v6+21rbRsZG6+wr////yooKv39/cXExebn5vj4+Pz8/HBxcEpLSuDf4I+Oj9vc2/n5+Tw+PC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ROMQBCpiACgkDJJbIgSHZR5QG6CmVHl1IAGynlAKCNTeVAxiaIYBeVEEwgw1l5DADeGEEAQAh+QQJBwA7ACwAAAAAQABAAAAG/8CdcEgsGo/IpHLJbDqf0Kh0Sl1GHASNI1LtOkMJnVgnCHnPyEh4LE5w0XBhis32xOMS+lhyVy4CIiIBC0p5ejoIfUglDGwGJUkehzp2ikUBAHoAAUgFBnoGBUoNHxgqH6JSC42HDIRHLBlsGS1KB6xiDBdSFJNiFEkFKQQEHqlJH3oVUgO+OgpwuGMJzM4DcJ90BlIWzhZwFXoaqtmgr2cX0gYHU5iawHENFRkZH29TD+oPlnAFgCIUzvEbSLCgwYMIEypcWOTAiBG7GD55MCGTDgATOElc4sAiGwAONiZ54JHOpoUFjhkh4WxCwgYSAACQ0MDIiZKaTiA0JIZPkf9eznR8MxihJAAORboFHVqQg1GkRDrgNNkBIQI2iYxMaJkwAgKZCKBemioGALyXNZN01LRC'
    $Base64String &= 'pJIAGCwCwKDRrZIOD6va3cu3r98mKf8egVAh7twKEAQLQbGGjQAUggeQvQitL4jJZUH0JRBUB4E7IcxMaexLQJyvALJCOYB5DAB2DQeYEADAxADYSdxdrOuEdefXRTaQFiNgg5IScvdFEdDZNBECkwF8ToJaNRQNnacLkewMwLWRyqVc7q5ZCITWZSMqUhC98vbOYr5bcsCcjoCQRLbCJ0EQggYVMmWgQWJFDOfLNgY1kNYR9XVGjV36dcafXQrA98xe5/1GIIXoubcQF3STSCfQXhu4oIcLxsERBAA7'
    Local Const $bString = Binary(_WinAPI_Base64Decode($Base64String))
    If $bSaveBinary Then
        Local Const $hFile = FileOpen($sSavePath & "\Loading.gif", 18)
        If @error Then Return SetError(1, 0, 0)
        FileWrite($hFile, $bString)
        FileClose($hFile)
    EndIf
    Return $bString
EndFunc   ;==>_Base64String

Func _WinAPI_Base64Decode($sB64String)
    Local $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "ptr", 0, "dword*", 0, "ptr", 0, "ptr", 0)
    If @error Or Not $aCrypt[0] Then Return SetError(1, 0, "")
    Local $bBuffer = DllStructCreate("byte[" & $aCrypt[5] & "]")
    $aCrypt = DllCall("Crypt32.dll", "bool", "CryptStringToBinaryA", "str", $sB64String, "dword", 0, "dword", 1, "struct*", $bBuffer, "dword*", $aCrypt[5], "ptr", 0, "ptr", 0)
    If @error Or Not $aCrypt[0] Then Return SetError(2, 0, "")
    Return DllStructGetData($bBuffer, 1)
EndFunc   ;==>_WinAPI_Base64Decode

 


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Uhh thx so much UEZ :)

That works like a charm.

 

Cheers

/Rex

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

.

Edited by guiltyking
wrong post

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now