Champak Posted May 23, 2008 Share Posted May 23, 2008 (edited) I redid this post so it is a little clearer, solution preferences are in order. 1/ Is there a way to change the gamma level of an image? 2/ Is it possible to change the transparency level on a label like winsettrans? If not, is there some type of manipulation or workaround to achieve this? 3/ If those aren't possible, can I layer a gui on top my main gui, set that top gui to a certain level of transparency (NOT fully transparent), and click through it? Edited May 29, 2008 by Champak Link to comment Share on other sites More sharing options...
Champak Posted May 29, 2008 Author Share Posted May 29, 2008 bump Link to comment Share on other sites More sharing options...
Champak Posted June 2, 2008 Author Share Posted June 2, 2008 So are my questions not possible or just unknown? Link to comment Share on other sites More sharing options...
ChrisL Posted June 2, 2008 Share Posted June 2, 2008 I redid this post so it is a little clearer, solution preferences are in order.1/ Is there a way to change the gamma level of an image?2/ Is it possible to change the transparency level on a label like winsettrans? If not, is there some type of manipulation or workaround to achieve this?3/ If those aren't possible, can I layer a gui on top my main gui, set that top gui to a certain level of transparency (NOT fully transparent), and click through it?1 Have a look at ImageMagic control with COM http://www.autoitscript.com/forum/index.php?showtopic=490652 Try $hwnd = ControlGetHandle ( "title", "text", controlID ) then once you have a Handle to the control see if you can use WinSetTrans($hwnd) (use $hwnd = GUICtrlGetHandle ( controlID ) if it's an AutoIt self made gui) Maybe??? [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Champak Posted June 3, 2008 Author Share Posted June 3, 2008 Thanks, the ImageMagic did the trick. Link to comment Share on other sites More sharing options...
ChrisL Posted June 3, 2008 Share Posted June 3, 2008 (edited) I had more time to play with transparent labels, my suggested method above wont work as you probably know already. See below code, You have to set a transparency level for each child gui which has controls in it or you won't see it at all! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $gui, $background, $msg $gui = GUICreate("Background", 400, 100) ; background picture $background = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 0, 0, 400, 100) GUISetState(@SW_SHOW) ; transparent child window $LabelGui = GUICreate("", 120, 20, 260, 70, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_MDICHILD, $gui) $label = GUICtrlCreateLabel("Transparent label",0,0,120,20) GUISetState(@SW_SHOW) For $i = 1 to 255 WinSetTrans($LabelGui,"",$i);You have to set a transparency regardless or the gui will be fully transparent and you wont see the label Sleep (5) Next For $i = 255 to 150 Step -1 WinSetTrans($LabelGui,"",$i) Sleep (5) Next Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Edited June 3, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted June 3, 2008 Share Posted June 3, 2008 (edited) Simplified as a UDF #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $gui, $background, $msg $gui = GUICreate("Background", 400, 100) ; background picture $background = GUICtrlCreatePic(@SystemDir & "\oobe\images\mslogo.jpg", 0, 0, 400, 100) GUISetState(@SW_SHOW) $label = _TransparentLabel($Gui,"Transparent label",260, 70,120, 20) GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() If $msg = $Label[1] then Msgbox(0,"","You clicked the label") Until $msg = $GUI_EVENT_CLOSE Func _TransparentLabel($GuiHwnd,$vText,$iXpos,$iYpos,$iWidth,$iHeight,$iStyle=-1,$iExtended=-1,$iTrans=150) Local $ret[2] $ret[0] = GUICreate("", $iWidth, $iHeight, $iXpos, $iYpos, 0x80000000, 0x00080000 + 0x00000040, $GuiHwnd) $ret[1] = GUICtrlCreateLabel($vText,0,0,$iWidth,$iHeight,$iStyle,$iExtended) GUISetState(@SW_SHOW,$Ret[0]) WinSetTrans($Ret[0],"",$iTrans) Return $ret EndFunc Edit: Included Styles option Edited June 3, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Champak Posted June 4, 2008 Author Share Posted June 4, 2008 Yeah, I've tried the transparent gui before, but that wont work for my needs. Thanks anyway. However, I am having a problem with registering the imagemagick dll. Did you use it, or you just came across it and pointed it out to me? If you did use it, did you use the compiled script on a different computer successfully? You can check out my post in the thread you pointed out to me. Thanks. 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