this-is-me Posted September 16, 2004 Share Posted September 16, 2004 I am trying to remove the background of a label because I have a label overlapping a picture. According to the info I have found on the web elsewhere, If $WS_EX_TRANSPARENT is used as an exstyle, then the background of the label should be removed. Here is the code: GUISetControl("label", "Messages" & @CRLF & "Testing", 190, 5, 200, 26, 0, $WS_EX_TRANSPARENT) Does it not work on labels, or am I doing something something wrong? Who else would I be? Link to comment Share on other sites More sharing options...
Valik Posted September 17, 2004 Share Posted September 17, 2004 WS_EX_TRANSPARENT also requires an internal API call to be made in order to actually change the opacity of a window/control. Link to comment Share on other sites More sharing options...
this-is-me Posted September 17, 2004 Author Share Posted September 17, 2004 Then the simple question is can this be done in any form currently, and if not, could it be added as part of the backcolor of GUISetControlEx where if the background is a string "Transparent" then autoit would call the required api? Who else would I be? Link to comment Share on other sites More sharing options...
Valik Posted September 17, 2004 Share Posted September 17, 2004 I'll test this on a label or something, but I don't know if this will do exactly what you want as is. It might require more work (i.e. Using the other side of the API call I don't use). If you could point out what references on the web you found information on this, then I could answer better after seeing those. Link to comment Share on other sites More sharing options...
this-is-me Posted September 19, 2004 Author Share Posted September 19, 2004 The info I had seems to be from an unreliable source, but here is some information on exactly what I want to do and how to do it:http://www.codeproject.com/staticctrl/transparentstatic.asp Who else would I be? Link to comment Share on other sites More sharing options...
Valik Posted September 19, 2004 Share Posted September 19, 2004 Thats a can of worms best left closed. Implementing this using that method basically takes over the entire drawing of the control. Thats a never-ending road once people figure out thats possible because you can pretty much cause controls to be drawn however you want when able to manipulate the API like that. The code (albeit MFC) is simple and straightforward and easily ported to the Win32 API, so there's no need for my input. If Jon, JP, or Holger feel its worth the effort to start drawing controls manually to support more features, then one of them can make the decision to include it. Link to comment Share on other sites More sharing options...
jpm Posted September 19, 2004 Share Posted September 19, 2004 Thats a can of worms best left closed. Implementing this using that method basically takes over the entire drawing of the control. Thats a never-ending road once people figure out thats possible because you can pretty much cause controls to be drawn however you want when able to manipulate the API like that. The code (albeit MFC) is simple and straightforward and easily ported to the Win32 API, so there's no need for my input. If Jon, JP, or Holger feel its worth the effort to start drawing controls manually to support more features, then one of them can make the decision to include it. <{POST_SNAPBACK}>That's the same situation I face when I want to have tab painted. I agree with you Valik we are not colmating all windows API Link to comment Share on other sites More sharing options...
this-is-me Posted September 20, 2004 Author Share Posted September 20, 2004 (edited) Oh well, I had hoped.EDIT: How come this is so easy in VB? Why isn't it easy in autoit? There are more people that want this functionality as well: http://www.autoitscript.com/forum/index.php?showtopic=4918 Edited September 20, 2004 by this-is-me Who else would I be? Link to comment Share on other sites More sharing options...
Valik Posted September 20, 2004 Share Posted September 20, 2004 One of the primary focuses of VB is rapid GUI development. Also, you can gain access to the Windows API in VB, so it doesn't require it to be manually wrapped and exposed. Link to comment Share on other sites More sharing options...
this-is-me Posted September 20, 2004 Author Share Posted September 20, 2004 Thanks, folks. Who else would I be? 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