Jump to content

transparent background


Recommended Posts

okay on my gui i want to have the background to be transparent not the whole window and its controls... any ideas?

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

i tried to solve this for like a year, and my conclusion was this: AutoIt is not capable of doing it. The only way I figured out to do this is create a new window and useing the techniques used in the Pong Santa example to strip it. I also believe someone figured out a way o animate it but you wouldn't need that. Ya thyat should work. o_0

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Link to comment
Share on other sites

i tried to solve this for like a year, and my conclusion was this: AutoIt is not capable of doing it. The only way I figured out to do this is create a new window and useing the techniques used in the Pong Santa example to strip it. I also believe someone figured out a way o animate it but you wouldn't need that. Ya thyat should work. o_0

This can be done using regions.

Regions can be created as rectangles, or based on bitmpas or text regions.

Look at my Frame example or Larry's text regions or search forum for CreateRectRgn/CombineRgn/SetWindowRgn API functions

Link to comment
Share on other sites

  • 6 months later...

I know this is old, but I was looking for something else and came across this so decided to chime in. There is actually a much faster/easier way to do this without calling other functions or special code. Make a transparent image and layer it to the size of the GUI. The only thing that is really required in the GUICreate is the extended style "$WS_EX_LAYERED".

$GUICompDir = GuiCreate($Title, 145, 90,200, 200, $WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_TOPMOST,$WS_EX_TOOLWINDOW))
   $TLPic = GUICtrlCreatePic("TransparentPic.gif", 0, 0, 145, 105)
   $LabelTrans = GUICtrlCreateLabel("BG", -2, 17, 145, 50, $SS_Center)
   GUICtrlSetFont($LabelTrans, 38, 1000)
   GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
   $LabelNOTrans = GUICtrlCreateLabel("No BKG", 0, 0, 50, 20)
   GUICtrlSetFont($LabelNOTrans, 13, 700)
GUISetState()

Here's the trick about it, if you are creating transparent text labels, the color of the text needs to be the same color of the transparent image (the original color you set you image program up to make transparent). However, if you don't make the text that color, you can get a really cool drop shadow effect...it really works great either way.

Edited by Champak
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...