Sign in to follow this  
Followers 0
Guest Beefteck

Transparent Window?

7 posts in this topic

Hey autoit members I was thinking adding another part to my program, i was working on the new interface for the last 3 days and have it almost complete BUT is it possible to get the background (the gray part of the window unless you had it colored) to be transparent so the buttons and test would look like they are on the desktop. I will be back this afternoon and thanx for the great help!

-Beefteck :whistle:

Share this post


Link to post
Share on other sites



Hey Beefteck, I'm not sure if this will help you, but you may be able to study this script.

Function: Hold SHIFT+CTRL+{the numbers 1-10} to set the transparency of ANY window.

For $i = 0 To 10
    HotKeySet("+^" & $i,"_trans")
Next

While 1
    Sleep(10)
WEnd

Func _trans()
    If StringTrimLeft(@HotKeyPressed, 2) = "0" Then
        $x = 9
    Else
        $x = StringTrimLeft(@HotKeyPressed, 2) - 1
    EndIf
    WinSetTrans("", "", 255 / 9 * $x)
EndFunc

Hopefully this helped!

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

No, he wants a see-through window. You have to edit the region of the window to prevent it from drawing or processing messages for those pieces. It is rather complicated and I'm not sure how well it will work in AutoIt. You might be better off putting controls on the desktop directly.

Share this post


Link to post
Share on other sites

No, he wants a see-through window. You have to edit the region of the window to prevent it from drawing or processing messages for those pieces. It is rather complicated and I'm not sure how well it will work in AutoIt. You might be better off putting controls on the desktop directly.

Actually it's been done before in autoit, might want to search for CreateRectRgn.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Dunno if it will help, but AnyGUI might be of some help to you.

Share this post


Link to post
Share on other sites

here ya go...

Please note, these controls don't behave like normal controls look at the examples to see how they are used.

Thanks Smoke_N for this script.

#include <GUIConstants.au3>
;Functions used from AnyGUI v2.6 by Quaizywabbit


$DeskTop = ControlGetHandle('Program Manager', 'FolderView', 'SysListView321')
$C1 = _TargetaddCombo('', @DesktopWidth - 155, 65, 135, 20, Default, Default, $DeskTop)
GUICtrlSetData($C1[0], "It|is|possible|to|create|that|type|of|GUI")
GUISetState()
$B1 = _TargetaddButton("Example 1", @DesktopWidth - 80, 100, 60, 30, -1, -1, $DeskTop)
GUISetState()
$B2 = _TargetaddButton("Example 2", @DesktopWidth - 150, 100, 60, 30, -1, -1, $DeskTop)
GUISetState()

While WinExists($DeskTop)
    $msg = GUIGetMsg(1)
    Select
        Case $msg[0] = $B1[0]
            MsgBox(0, 'Example', 'This is just an example')
        Case $msg[0] = $B2[0]
            If GUICtrlRead($C1[0]) <> '' Then MsgBox(64, 'Info', GUICtrlRead($C1[0]))
            If MsgBox(4, 'Exit?', 'Would you like to exit?') = 6 Then Exit
    EndSelect
    Sleep(5)
WEnd

Func _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $LocTargethWnd = 0);
    If not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd
    Local $a = GUICreate($text, $SizeX, $SizeY, $PosX, $PosY, $WS_CHILD, -1, $TargethWnd)
    If $a = 0 Then SetError(1)
    Return $a
EndFunc   ;==>_TargetaddChild

Func _TargetaddCombo($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0)
    If not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd
    Local $a[3]
    $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd)
    $a[0] = GUICtrlCreateCombo($text, 0, 0, $SizeX, $SizeY, $style, $exstyle)
    $a[1] = ControlGetHandle($a[2], "", $a[0])
    If $a[2] = 0 Or $a[0] = 0 Or $a[1] = "" Then
        SetError(1)
        Return 0
    Else
        Return $a
    EndIf
EndFunc   ;==>_TargetaddCombo

Func _TargetaddButton($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0)
    If not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd
    Local $a[3]
    $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd)
    $a[0] = GUICtrlCreateButton($text, 0, 0, $SizeX, $SizeY, $style, $exstyle)
    $a[1] = ControlGetHandle($a[2], "", $a[0])
    If $a[2] = 0 Or $a[0] = 0 Or $a[1] = "" Then
        SetError(1)
        Return 0
    Else
        Return $a
    EndIf
EndFunc   ;==>_TargetaddButton

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

hmmm... ok well i will try these thanks for the help, I've just decided to make maybe a picture as the background... is this possible??? if not i will just keep it as the sea green solid color i have

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