Pieter Posted December 31, 2006 Posted December 31, 2006 I want to display a GIF image (see attachment) that uses transparency. However, the transparent part of the image has been replaced with the color black. I tried to fix this like so (as described in the manual): $status_icon = GUICtrlCreatePic("img_src\iPodCALsync_aboutico.gif", 8, 8, 65, 64, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)Unfortunately, this code doesn't fix the problem. Is there anything else I should try? iPod + Online calendars = iPodCALsync
Pieter Posted January 1, 2007 Author Posted January 1, 2007 And changing the background color to whiteGUICtrlSetBkColor($status_icon, 0xFFFFFF)doesn't work either. iPod + Online calendars = iPodCALsync
jpm Posted January 1, 2007 Posted January 1, 2007 I want to display a GIF image (see attachment) that uses transparency. However, the transparent part of the image has been replaced with the color black. I tried to fix this like so (as described in the manual): $status_icon = GUICtrlCreatePic("img_src\iPodCALsync_aboutico.gif", 8, 8, 65, 64, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)oÝ÷ ÙIߢ»n«^+aÇ(uçhzÉ÷ö×âÆØ^¦ºé²Ø^æ§ÊØb¥±â,¥vÚòþ«¨µèÆ¥Á¬¬¶Z½æ¢jez×°¢¹"®*m";¬µ§]ÂÇ^±ÊâmçbìZ^Úíè^§vØZßÛwºÚ"µÍÚ[ÛYH ÑÕRPÛÛÝ[Ë]LÉÝÂÌÍÜXÏQÕRPÜX]J ][ÝÉ][ÝËMMLL ÌÍÕÔ×ÔÔT ÌÍÕÔ×ÑVÓVQTQ BÌÍÜÝ]×ÚXÛÛHÕRPÝÜX]TXÊ ][ÝÝ[Ü[ÚY][ÝËMM]Ô ÌÍÔÔ×ÓÕQK ÌÍÕÔ×ÑÔÕT JBÕRPÝÙ]ÐÛÛÜLK ÌÍÑÕRWÐÐÓÓÔÕSÔTS BÕRTÙ]Ý]J B ÌÍÛÙÈHÕRQÙ]ÙÊ B[[ ÌÍÛÙÈH ÌÍÑÕRWÑUSÐÓÔÑB^]
Pieter Posted January 1, 2007 Author Posted January 1, 2007 (edited) This doesn't do what I thought it would do. I need the transparent part to have the color of the GUI. Is there a way to fetch the GUI background color string? (I don't want the window to look ugly if people don't use the default XP theme.) Edited January 1, 2007 by Pieter iPod + Online calendars = iPodCALsync
martin Posted January 1, 2007 Posted January 1, 2007 it is always good to have a complete working script. I just add what is described in example 2 of the help and tha's fine;)#include <GUIConstants.au3> $pic=GUICreate("", 96, 96, 100, 100,$WS_POPUP,$WS_EX_LAYERED) $status_icon = GUICtrlCreatePic("transparent.gif", 0, 0, 96, 96, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState() do $msg = GUIGetMsg() until $msg = $GUI_EVENT_CLOSE Exit Why does having the form set to $WS_POPUP make the gif background transparency work? The background should be transparent even if it's not $WS_POPUP, but as Pieter says, it's black. Also, if the gif background is transparent why does that also make the form transparent in that area? I think this behaviour is wrong. 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.
Pieter Posted January 1, 2007 Author Posted January 1, 2007 Right now, this is what it looks like:With 'transparent', I mean something like this (manipulated screenshot):How can I accomplish this? iPod + Online calendars = iPodCALsync
martin Posted January 1, 2007 Posted January 1, 2007 (edited) Right now, this is what it looks like: With 'transparent', I mean something like this (manipulated screenshot): How can I accomplish this? You can do it like by having another form behind which is not set as $WS_POPUP #include <GUIConstants.au3> $p0c=GUICreate("", 190, 160, 100, 100) GUISetState() $pic=GUICreate("dsfvsds", 196, 196, 100, 100,$WS_POPUP,$WS_EX_LAYERED);,$WS_POPUP,$WS_EX_LAYERED) $status_icon = GUICtrlCreatePic("transparent.gif", 10, 10, 96, 96, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState() do $msg = GUIGetMsg() until $msg = $GUI_EVENT_CLOSE Exit But as I said in my last post, I think the behaviour is wrong and you shouldn't need to do things like this. Edited January 1, 2007 by martin 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.
jpm Posted January 4, 2007 Posted January 4, 2007 You can do it like by having another form behind which is not set as $WS_POPUP #include <GUIConstants.au3> $p0c=GUICreate("", 190, 160, 100, 100) GUISetState() $pic=GUICreate("dsfvsds", 196, 196, 100, 100,$WS_POPUP,$WS_EX_LAYERED);,$WS_POPUP,$WS_EX_LAYERED) $status_icon = GUICtrlCreatePic("transparent.gif", 10, 10, 96, 96, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUISetState() do $msg = GUIGetMsg() until $msg = $GUI_EVENT_CLOSE Exit But as I said in my last post, I think the behaviour is wrong and you shouldn't need to do things like this.You need to define the background so the multiple windows as described in the example2 with do it.
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