sshrum Posted February 16, 2006 Share Posted February 16, 2006 I've create a GUI dialog with a picture control (think splash screen but I want to put a text indicator on it) I want to put a transparent label control on it so the pic shows thru, this way, while my script is loading up, I can display status text in the label. TIA Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
MHz Posted February 16, 2006 Share Posted February 16, 2006 Something like this perhaps. Use > Beta 3.1.1.108 #include <GUIConstants.au3> ; Find a picture to use as Gui background. Global $picture If FileChangeDir(@WindowsDir & '\Web\Wallpaper') Then $handle = FileFindFirstFile('*.jpg') If $handle <> -1 Then $picture = FileFindNextFile($handle) FileClose($handle) EndIf EndIf ; Setup the Gui $title = 'Transparent Label Test with AutoIt ' & FileGetVersion(@AutoItExe) $handle = GUICreate($title, 320, 240, Default, Default, $WS_POPUP) If FileExists($picture) Then GUICtrlCreatePic($picture, 0, 0, 320, 240) GUICtrlSetState(Default, $GUI_DISABLE) Else MsgBox(0, '', 'A picture was not found to test with in ' & @WorkingDir) Exit EndIf If GUICtrlCreateLabel('Testing: ' & $title, 10, 50, 300, 50) Then GUICtrlSetBkColor(Default, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor(Default, 0xFFFFFF) EndIf GuiSetState() Do Sleep(500) Until Not WinActive($handle) Link to comment Share on other sites More sharing options...
tonedeaf Posted February 16, 2006 Share Posted February 16, 2006 (edited) @MHzYour script is working for making statics (labels) transparent.Do you know how to make the following controls transparent?> Checkbox> Radio> Input, EditThe GuiCtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) is not working for the above controls.ThanksEDIT: Looks like the same problem has also been raised in this post:http://www.autoitscript.com/forum/index.php?showtopic=21687 Edited February 16, 2006 by tonedeaf Link to comment Share on other sites More sharing options...
MHz Posted February 16, 2006 Share Posted February 16, 2006 @tonedeaf I saw that post you linked. Previous to < 3.1.1.107, I did know, but now.... I have a fullscreen Gui that runs from Windows setup that used to be label transparent, but now is not with the new changes. Something seems not right. Well, that is beta for you. Cannot be perfect with every release. Link to comment Share on other sites More sharing options...
sshrum Posted February 16, 2006 Author Share Posted February 16, 2006 Works great with 108 beta. Background is black if using earlier versions. Thanx. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
bob.frew Posted February 16, 2006 Share Posted February 16, 2006 Many thanks MHz, you've answered a couple of questions I had with that piece of code. I like it. This is probably the wrong place , (but it seems relevant to me) Has the other transparency problem which is bothering me been solved ? I want a transparent image on a GUI window which will show the GUI background colour through the transparent parts of the image. All I can get at the moment is to see through the image AND the GUI to whatever is behingd the GUI window. Am I missing a trick or is this just a "no can do" ? If anyone has an example of this it would be great. Hopeful --- Bob AutoIt is great - leave me alone and I'll play for hours Link to comment Share on other sites More sharing options...
MHz Posted February 17, 2006 Share Posted February 17, 2006 Bob, Labels seem to be conditional with transparency, so that code is considered as very beta with the current version. Last transparent label I saw had a solid black background. As far as Transparency is at the moment, my thoughts are that while it seems to be going through a regression/transistion stage then attempting to solve a simple task seems differcult enough. 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