ryeguy Posted May 29, 2009 Posted May 29, 2009 How can I use a GIF's transparency when it is displayed as a Pic control? I have some in my app and the background is displayed as white instead of being transparent.
Moderators SmOke_N Posted May 29, 2009 Moderators Posted May 29, 2009 None of these had your answer?http://www.autoitscript.com/forum/index.ph...ackground%2Bgifhttp://www.autoitscript.com/forum/index.ph...rent+backgroundhttp://www.autoitscript.com/forum/index.ph...ackground%2Bgif Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
ryeguy Posted May 29, 2009 Author Posted May 29, 2009 I might be blind, but no, I really could not find anything. A majority of those threads are about making the gui window itself transparent - I don't want that. There were 3 solutions I found in those threads: WS_EX_LAYERED - This makes the window see through; I just want the background of a .gif pic control to be transparent (it displays as white) Larry's DLL - This uses a BMP as a transparency mask for the entire GUI window, so that wont work for me Creating a new GUI with just the GIF on it - I'm using a tabbed control so this would be more work than its worth Am I missing anything? I probably am but there was nothing I could see.
martin Posted May 29, 2009 Posted May 29, 2009 I might be blind, but no, I really could not find anything. A majority of those threads are about making the gui window itself transparent - I don't want that. There were 3 solutions I found in those threads:WS_EX_LAYERED - This makes the window see through; I just want the background of a .gif pic control to be transparent (it displays as white)Larry's DLL - This uses a BMP as a transparency mask for the entire GUI window, so that wont work for meCreating a new GUI with just the GIF on it - I'm using a tabbed control so this would be more work than its worthAm I missing anything? I probably am but there was nothing I could see.Can youshow some code and the gif with the problem? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
ryeguy Posted May 30, 2009 Author Posted May 30, 2009 The code is simply$Pic1 = GUICtrlCreatePic("graphics\mail.gif", 0, 0, 65, 65)Here is a screenshot. Notice the BG is white - that is what is marked as transparent on the GIF.The gif is attached.
Yashied Posted May 30, 2009 Posted May 30, 2009 #Include <Icons.au3> GUICreate('Test', 214, 214) $Pic = GUICtrlCreatePic('', 75, 75, 64, 64) _SetImage($Pic, 'graphics\mail.gif') GUISetState() Do Until GUIGetMsg() = -3Icons.au3 My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Zedna Posted May 30, 2009 Posted May 30, 2009 #Include <Icons.au3> GUICreate('Test', 214, 214) $Pic = GUICtrlCreatePic('', 75, 75, 64, 64) _SetImage($Pic, 'graphics\mail.gif') GUISetState() Do Until GUIGetMsg() = -3 Icons.au3 Nice/handy example/UDF Yashied!! Resources UDF ResourcesEx UDF AutoIt Forum Search
ryeguy Posted May 30, 2009 Author Posted May 30, 2009 #Include <Icons.au3> GUICreate('Test', 214, 214) $Pic = GUICtrlCreatePic('', 75, 75, 64, 64) _SetImage($Pic, 'graphics\mail.gif') GUISetState() Do Until GUIGetMsg() = -3 Icons.au3Thank you. Simple and sweet.
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