Uten Posted June 3, 2007 Share Posted June 3, 2007 Does anyone of you know how to make a input control transparent? I know that this only works with picture and label controls. GUICtrlSetBkColor( $ctlID, $GUI_BKCOLOR_TRANSPARENT ) Any suggestions? Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Zedna Posted June 4, 2007 Share Posted June 4, 2007 Look at CreateTextRegion from Larry.Try to use this technique for your input. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Uten Posted June 4, 2007 Author Share Posted June 4, 2007 Now, thats a cool tip @Zedna! I know I can do it in API calls only (create my own text control), but it requires time I don't have at the moment. The sample by @Larry lacks editability, but it is a start. But thanks a lot for it. It will come in handy.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
smashly Posted June 5, 2007 Share Posted June 5, 2007 Hi, I used a bodgey way to get an edit control to be transparent for one of my projects a while ago, only because I had no idea how to do it properly. It worked , but there must be an easier/proper way.#include <GUIConstants.au3> $main = GUICreate('Transparency', 200, 55, -1, -1, -1, $WS_EX_TOPMOST) $Slider = GuiCtrlCreateSlider(5, 30, 190, 20,$TBS_NOTICKS + $TBS_BOTH) GUICtrlSetLimit($Slider, 255, 1) GUICtrlSetData($Slider, 255) GUISetState() $Child = GUICreate('Input', 188, 18, -1, -1, $WS_POPUP, $WS_EX_TOPMOST, $main) $Input = GUICtrlCreateInput('Use slider to set transparency', -1, -1, 190, 20) GUISetState() $old = GUICtrlRead($Slider) While 1 $wpm = WinGetPos($main) $x = $wpm[0] + 9 $y = $wpm[1] + 35 WinMove($Child, "", $x, $y) If GUICtrlRead($Slider) <> $old Then WinSetTrans($Child, "", GUICtrlRead($Slider)) $old = GUICtrlRead($Slider) EndIf $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Cheers Link to comment Share on other sites More sharing options...
Uten Posted June 5, 2007 Author Share Posted June 5, 2007 hmm, that was odd. I have tried WinSetTrans several times (image control underneath) but it did not work at all. Conflicting style settings? I Don't know. Will have to try again. Thanks for the working sample @smashly.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
JRSmile Posted January 27, 2008 Share Posted January 27, 2008 what about this: #include <GUIConstants.au3> $main = GUICreate('Transparency', 200, 55, -1, -1, -1, $WS_EX_TOPMOST) $Slider = GuiCtrlCreateSlider(5, 30, 190, 20,$TBS_NOTICKS + $TBS_BOTH) $label = GUICtrlCreateLabel('Use slider to set transparency', 8,15, 190, 20) GUICtrlSetLimit($Slider, 255, 1) GUICtrlSetData($Slider, 255) GUISetState() $Child = GUICreate('Input', 188, 18, -1, -1, $WS_POPUP, $WS_EX_TOPMOST, $main) $Input = GUICtrlCreateInput('Use slider to set transparency', -1, -1, 190, 20) GUISetState() $old = GUICtrlRead($Slider) $in_old = GUICtrlRead($Input) While 1 if $in_old <> GUICtrlRead($Input) Then GUICtrlSetData($label, GUICtrlRead($Input)) $in_old = GUICtrlRead($Input) $wpm = WinGetPos($main) $x = $wpm[0] + 9 $y = $wpm[1] + 35 WinMove($Child, "", $x, $y) If GUICtrlRead($Slider) <> $old Then WinSetTrans($Child, "", GUICtrlRead($Slider)) $old = GUICtrlRead($Slider) EndIf $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) 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