Jump to content

GUI background that is see-through


Go to solution Solved by ghost11996,

Recommended Posts

Posted (edited)

HI all, I am new to coding. I have a gui popup that has some buttons and a GUICtrlCreateEdit field in it. I need the background color of most (maybe except buttons) to be complete clear. so that the text in the edit field looks like it is just floating (or imprinted) on whatever application is behind it. The only stuff that would have a different color then the application behind the popup would be the color of the font in the edit field.

if this makes a difference, my gui also has a GUICtrlCreateTab in it..

And yes I spent the last couple days looking on forums but have not found what I am looking for. Maybe I am using the wrong keywords.

Thanks all for any help

Edited by Maclotro
  • Solution
Posted

Hello Maclotro

Welcome to Autoit Forum :shifty:

You can use the search on forum page with "transparent gui" keyword

This is what you want ?

#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
$st1 = $WS_POPUP
$st2 = BitOR($WS_EX_LAYERED,$WS_EX_TOOLWINDOW,$WS_EX_TOPMOST,$WS_EX_LAYERED)
$hMain = GUICreate("Transparency Window",600,400,-1,-1,$st1,$st2)
$edit = GUICtrlCreateEdit("Edit",0,0,600,50)
$button1 = GUICtrlCreateButton("Button1",0,50,50,50)
_WinAPI_SetLayeredWindowAttributes($hMain, 0xABCDEF, 255)
GUISetBkColor(0xABCDEF)
GUISetState()
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $button1

        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

[color=rgb(255,0,0);]C[/color][color=rgb(255,140,0);]a[/color][color=rgb(255,215,0);]n[/color] [color=rgb(255,255,0);]i[/color] [color=rgb(175,238,238);]e[/color][color=rgb(0,255,255);]a[/color][color=rgb(64,224,208);]t[/color] [color=rgb(0,0,205);]S[/color][color=rgb(0,0,255);]i[/color][color=rgb(0,0,128);]g[/color][color=rgb(75,0,130);]n[/color][color=rgb(128,0,128);]at[/color][color=rgb(238,130,238);]u[/color][color=rgb(221,160,221);]r[/color][color=rgb(230,230,250);]e[/color] [color=rgb(0,255,0);]?[/color] :ermm: [color=rgb(0,255,0);]Project: Mini Youtube BETA[/color]

Posted

Hi Ghost

Yes the main gui is clear(see thru). But the GUICtrlCreateEdit field still has a white background. I am looking for the entire thing to be clear. Basically I am looking to create a scrolling text window in it. But can't afford to loose a lot of my overall view of the application this popup is over top of. So if I can make most of the gui (if not all) see thru other then the text inside the edit field that be great.

Thanks for your help, and I will try those keywords.

  • 1 month later...
Posted

Mind sharing how you solved it?

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

Posted

HI Careca -

Look at the post that is marked Answered and just add in changing the background color of the edit control for transparency-> GUICtrlSetBkColor($edit, 0xABCDEF)

Posted

Thank you.

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

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
  • Recently Browsing   0 members

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