Sign in to follow this  
Followers 0
DustinBowers

Semi-Transparent GUI?

5 posts in this topic

Hi, I've very new to AutoIt and had a question about GUI Transparency. I would like to make my GUI Semi-Transparent, such as with a white (or other color) shade through which you can see the rest of the desktop or whatever lays below, i can get full transparentcy using bg color 0x000000 but, not sure how to do the rest, Any suggestions?

Share this post


Link to post
Share on other sites



Are you looking for the command winsettrans or something more elaborate?

Share this post


Link to post
Share on other sites

Well I've seen a program recently where the form nearly takes up the entire screen and is variable Opaque or Transparent based on a slide bar, and when the user moves the form you still see the desktop or windows below it in real time as its moved, wanted to know if this sort of application is possible with autoit and if so how complex of a task it is, as i would only rank my skills as novis. I havent programmed anything worth mention since VB4 :D and could use any advise as to what direction to look in? Basically trying to get a grasp as to how complex i could get auto it to become and how much effort on my part its going to be, i consider myself a fairly quick learner. Thanks for any help you can offer.

Share this post


Link to post
Share on other sites

#include <GUIConstantsEx.au3>
$same=255
Example()

Func Example()
    Local $slider1, $button, $msg
    
    $gui=GUICreate("slider", 220, 300,300, 200)
    GUISetBkColor(0x00E0FFFF)  ; will change background color

    $slider1 = GUICtrlCreateSlider(10, 10, 200, 20)
    GUICtrlSetLimit(-1, 255, 0)     ; change min/max value
    GUISetState()
    GUICtrlSetData($slider1, $same)    ; set cursor

    while 1
        $msg = GUIGetMsg()
        $var=GUICtrlRead($slider1)
        if $var<>$same then
            WinSetTrans($gui,"",$var)
            $same=$var
        EndIf
    sleep(50)
    if $msg = $GUI_EVENT_CLOSE then Exit
    WEnd
EndFunc   ;==>Example

Share this post


Link to post
Share on other sites

Oh ok, so the trick is the WinSetTrans... This example is exactly what i was wondering. Thanks a lot for your help and the great example. :D

Share this post


Link to post
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
Sign in to follow this  
Followers 0