Raik Posted October 21, 2010 Share Posted October 21, 2010 GUICreate("Title", 300, 300,-1,-1,$WS_SYSMENU) $image = GUICtrlCreatePic("1.gif", 175, 20, 30, 30) .... GUICtrlSetImage($image,"2.gif") .... GUICtrlSetImage($image,"3.gif") i want a nonresizable gui with only a closebox and a pic, to show statuschange. i have removed the alpha-chanel from the gifs, saved them as bitmaps, but nothing helps. even with bitmaps instead of gifs i get transparent areas inside the pic and the new image does not replace the before but will be drawn (partialy transparent ) on top of it, so parts of the before image will stay visible. how may i remove this behavior (the transparency)? help states: GUICtrlCreatePic To have a transparent picture it is needed to create the GUI window with WS_EX_LAYERED extended style.but i have not set extended style. AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1) Link to comment Share on other sites More sharing options...
martin Posted October 21, 2010 Share Posted October 21, 2010 GUICreate("Title", 300, 300,-1,-1,$WS_SYSMENU) $image = GUICtrlCreatePic("1.gif", 175, 20, 30, 30) .... GUICtrlSetImage($image,"2.gif") .... GUICtrlSetImage($image,"3.gif") i want a nonresizable gui with only a closebox and a pic, to show statuschange. i have removed the alpha-chanel from the gifs, saved them as bitmaps, but nothing helps. even with bitmaps instead of gifs i get transparent areas inside the pic and the new image does not replace the before but will be drawn (partialy transparent ) on top of it, so parts of the before image will stay visible. how may i remove this behavior (the transparency)? help states: but i have not set extended style. Could you post some small example code which we can run and which lets us see the problem, with a sample image? 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. Link to comment Share on other sites More sharing options...
Raik Posted November 25, 2010 Author Share Posted November 25, 2010 Opt("GUIOnEventMode",1) Gui() Func Gui() Local $msg GUICreate("", 300, 300) GUISetOnEvent(-3, "End") Global $status_image = GUICtrlCreatePic("noShock.bmp", 10, 10, 32, 32) GUICtrlCreatePic("noShock.bmp", 10, 45, 32, 32) GUICtrlCreatePic("stopped.bmp", 10, 80, 32, 32) GUISetState(@SW_SHOW) EndFunc While 1 Sleep(1000) GUICtrlSetImage($status_image,"stopped.bmp") Sleep(1000) GUICtrlSetImage($status_image,"noShock.bmp") WEnd Func End() GUIDelete() Exit EndFuncstopped.bmpnoShock.bmp AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1) Link to comment Share on other sites More sharing options...
JoHanatCent Posted November 25, 2010 Share Posted November 25, 2010 (edited) You can clear the picture quickly just before you change it! While 1 GUICtrlSetImage($status_image, "stopped.bmp") Sleep(1000) GUICtrlSetImage($status_image, "") GUICtrlSetImage($status_image, "noShock.bmp") Sleep(1000) GUICtrlSetImage($status_image, "") WEnd If you do not want to change the current picture create a label under it with it's own colour: $Stat_Label = GUICtrlCreateLabel(" ",10, 10,32,32) GUICtrlSetBKColor($Stat_Label, 0xFF0001) Edited November 25, 2010 by JoHanatCent Link to comment Share on other sites More sharing options...
Raik Posted November 26, 2010 Author Share Posted November 26, 2010 (edited) as a workaround, okbut still the question is, why is this behavior without the necessary extended style parameters ($WS_EX_LAYERED)? and why transparency with bitmaps??? is it my fail or a bug in autoit?btw. i have found another way: i use icons. but the question remains.Edit: typos Edited November 27, 2010 by Raik AutoIt-Syntaxsheme for Proton & Phase5 * Firefox Addons by me (resizable Textarea 0.1d) (docked JS-Console 0.1.1) 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