Laetterman Posted October 11, 2006 Posted October 11, 2006 (edited) how do i fade out a window with a pic with a transparent backgroundcolor? following exemple fades out a 'close'-button in two different ways. At the beginning the image is cut out correctly and the background is transparent. But while fading out there is always blue background... why?! #include <GUIConstants.au3> #include <Array.au3> HotKeySet("{ESC}", "f_Terminate") AutoItSetOption ( "TrayIconDebug", 1 ) Opt("WinTitleMatchMode", 3) Opt("GUIOnEventMode", 1) $parent = GUICreate("Gui", 200, 100, 50, 45, BitOr($WS_POPUP, $WS_BORDER), BitOr($WS_EX_TOPMOST,$WS_EX_TOOLWINDOW)) $close = GUICreate("Close", 17, 20, @DesktopWidth/2, @DesktopHeight/2, $WS_POPUP, $WS_EX_LAYERED, $parent) GUICtrlCreatePic(@ScriptDir & '\close2.gif', 0, 0, 17, 20) GUISetState (@SW_SHOW) Sleep(3000) For $i = 0 To 255 Sleep(10) WinSetTrans($close, "", 255-$i) Next Sleep(3000) WinSetTrans($close, "", 255) GUISetState (@SW_SHOW) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $close, "int", 3000, "long", 0x00090000);fade-out Func f_Terminate() Exit EndFunc Laetterman Edited October 13, 2006 by Laetterman
Laetterman Posted October 13, 2006 Author Posted October 13, 2006 Hello, ... so nobody has an idea?? Laetterman
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now