unknown12 Posted June 27, 2007 Share Posted June 27, 2007 Is there anyway to use PNG files with transparency in the GUI? I can't seem to do it. When I create a new 'pic' with the source as a png it just displays blank. Cheers. Link to comment Share on other sites More sharing options...
AutoItKing Posted June 27, 2007 Share Posted June 27, 2007 Yes there is, search "png gui". http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
AutoItKing Posted June 27, 2007 Share Posted June 27, 2007 Here it is: http://www.autoitscript.com/forum/index.php?showtopic=47651 http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
unknown12 Posted June 27, 2007 Author Share Posted June 27, 2007 (edited) I've found lod3n's script, but that is using a PNG for the entire GUI. I'm looking to do it for one control (As you can see, i'm a noob ). Edited June 27, 2007 by unknown12 Link to comment Share on other sites More sharing options...
ResNullius Posted June 29, 2007 Share Posted June 29, 2007 I've found lod3n's script, but that is using a PNG for the entire GUI. I'm looking to do it for one control (As you can see, i'm a noob ). This is from the Yahoo AutoIt Group, posted by valery_vi http://tech.groups.yahoo.com/group/AutoItList/message/31198 This script shows Torus.png (from Auto3Lib) inside Pic control: #include <A3LGDIPlus.au3> Global $hGUI, $Pic, $hPic, $hImage, $hGraphic ; Create GUI $hGUI = GUICreate("Show PNG", 400, 400) $Label = GUICtrlCreateLabel('Auto3Lib shows PNG file', 130, 20, 150, 20) _GDIP_StartUp() GUISetState() $Pic = GUICtrlCreatePic('',80,80, 240, 240) $hPic = ControlGetHandle("Show PNG", "", "Static2") ; Load PNG image $hImage = _GDIP_ImageLoadFromFile(@ScriptDir & "\Torus.png") ; Draw PNG image $hGraphic = _GDIP_GraphicsCreateFromHWND($hPic) _GDIP_GraphicsDrawImage($hGraphic, $hImage, 0, 0) ; Loop until user exits do until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIP_GraphicsDispose($hGraphic) _GDIP_ImageDispose($hImage) _GDIP_ShutDown() This method was used in ALS script (see above messages), too. Valery Link to comment Share on other sites More sharing options...
lordicast Posted August 21, 2007 Share Posted August 21, 2007 Yeah but the trick is posting 2 png files that throws everything out of wak [Cheeky]Comment[/Cheeky] 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