yawoo Posted November 9, 2005 Share Posted November 9, 2005 I would like to create a transparent image inside a GUI, but the result is not transparent and with white background color instead. Attached the result GUI and the source transparent GIF. Link to comment Share on other sites More sharing options...
jpm Posted November 9, 2005 Share Posted November 9, 2005 did you did the help recommendationTo have a transparent picture it is needed to use a .gif image with the transparency color set and to create the window with WS_EX_LAYERED extended style.It is always a good idea you post a simplified script that reproduce your problem Link to comment Share on other sites More sharing options...
yawoo Posted November 9, 2005 Author Share Posted November 9, 2005 (edited) did you did the help recommendationIt is always a good idea you post a simplified script that reproduce your problem Sorry, no coding posted, since my coding is too complex and long to post here.If attribute $WS_EX_LAYERED is applied to GUICreate(), it will cause the whole windows transparent tothe windows OS, rather than the image transparent to the windows created by Autoit.But if I use GUICtrlCreateIcon, it can make the icon picture transparent to the windows created by Autoit. Edited November 9, 2005 by yawoo Link to comment Share on other sites More sharing options...
jpm Posted November 9, 2005 Share Posted November 9, 2005 You cannot use a GUICtrlCreateIcon to load a .gif you need to converted it to an .ico format. Link to comment Share on other sites More sharing options...
yawoo Posted November 9, 2005 Author Share Posted November 9, 2005 You cannot use a GUICtrlCreateIcon to load a .gif you need to converted it to an .ico format. Thanks for your information.The problem I got is that I can use GUICtrlCreateIcon to load transparent .ico file, while usingGUICtrlCreatePic to load transparent .gif file, it cannot show the transparent effect properly. Link to comment Share on other sites More sharing options...
jpm Posted November 9, 2005 Share Posted November 9, 2005 (edited) Thanks for your information.The problem I got is that I can use GUICtrlCreateIcon to load transparent .ico file, while usingGUICtrlCreatePic to load transparent .gif file, it cannot show the transparent effect properly.True you have to use .ico format if you want transparency with a control on a specific GUI.Edit:If somebody have good idea how to extend the transparency on pic control, I will be glad to work on it. Edited November 9, 2005 by jpm Link to comment Share on other sites More sharing options...
jpm Posted November 9, 2005 Share Posted November 9, 2005 @Larry I cannot have your example working no transparency Link to comment Share on other sites More sharing options...
Valik Posted November 10, 2005 Share Posted November 10, 2005 Windows 2000 may not (natively) support transparent GIF images. Link to comment Share on other sites More sharing options...
jpm Posted November 10, 2005 Share Posted November 10, 2005 (edited) hmmm you are right. it works (for me) on Win XP without $WS_EX_TRANSPARENT. on windows 2000... no luck yet.Lar.in fact this is all I need to work on XP...#include <GUIConstants.au3> $gui = GUICreate("Blanky") GUISetBkColor(0) $smurf = GUICtrlCreatePic(".\smurf.gif",0,0,113,153) GUISetState() Sleep(3000) GUIDelete($gui) $gui = GUICreate("Blanky") GUISetBkColor(0xFFFFFF) $smurf = GUICtrlCreatePic(".\smurf.gif",0,0,113,153) GUISetState() Sleep(3000)Unless i didn't catch the right .gif It does work for me under XP/Sp2 with classic theme Edit I confirm it is working with XP Theme!!! Can somebody tell what can be the difference? Edited November 10, 2005 by jpm Link to comment Share on other sites More sharing options...
DiskAI Posted November 10, 2005 Share Posted November 10, 2005 (edited) try something that seems to worked using bmp1. save the image under PNG2. open the image using mspaint and save it as 24 bit bmp3. try loading in place of the gifworks for mep/s : - ignore the funky color spits out by mspaint- picked the tip up from a vb help site- it might not be gif but .... - i don't think gif transparent is design to work on app formmaybe later version of autoit could include library such ashttp://www.soft-gems.net/Graphics.php Edited November 10, 2005 by DiskAI i think Link to comment Share on other sites More sharing options...
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