Sign in to follow this  
Followers 0
JavaScript_Freek

Transperency not working.

14 posts in this topic

#include <GUIConstants.au3>
AutoItSetOption("GUIResizeMode",802)
Global $oldwidth = 500, $oldheight = 100, $ontop = 1

GUICreate("Transparent Test",500,100,-1,-1,$WS_POPUP + $WS_SIZEBOX)
    GUICtrlCreateLabel("",28,28,32,20,$SS_BLACKFRAME)
    $trans = GUICtrlCreateSlider(60,37,73,18,$TBS_NOTICKS)
    GUICtrlSetLimit(-1,255,80)
    GUICtrlSetData(-1,220)
    GUICtrlCreateLabel("Transparency:",70,25,100,12)
    GUICtrlSetFont(-1,7)
    $top = GUICtrlCreateCheckbox('"Always On Top"',28,50)
    GUICtrlSetState(-1,1)
GUISetState()
WinSetTrans("Transparent Test","",220)
WinSetOnTop("Transparent Test","",1)

do
$msg = GUIGetMsg()
    If $msg = $trans then WinSetTrans("Transparent Test","",GUICtrlRead($trans))

Alright why isn't this working? :R


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites



Why isnt what working? The transparency works fine for me.

Share this post


Link to post
Share on other sites

Works fine on my end.

Share this post


Link to post
Share on other sites

WIll you get a guicreate pop up with a slider and label (transpareny) and every time u move sider the trancparency changes?


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

Yes

Share this post


Link to post
Share on other sites

Do you mean only the label should be transparent or the entire GUI?

Share this post


Link to post
Share on other sites

Entire GUI.

works fine here too!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

So

#include <GUIConstants.au3>

AutoItSetOption("GUIResizeMode",802)

Global $oldwidth = 500, $oldheight = 100, $ontop = 1

GUICreate("Transparent Test",500,100,-1,-1,$WS_POPUP + $WS_SIZEBOX)

GUICtrlCreateLabel("",28,28,32,20,$SS_BLACKFRAME)

$trans = GUICtrlCreateSlider(60,37,73,18,$TBS_NOTICKS)

GUICtrlSetLimit(-1,255,80)

GUICtrlSetData(-1,220)

GUICtrlCreateLabel("Transparency:",70,25,100,12)

GUICtrlSetFont(-1,7)

$top = GUICtrlCreateCheckbox('"Always On Top"',28,50)

GUICtrlSetState(-1,1)

GUISetState()

WinSetTrans("Transparent Test","",220)

WinSetOnTop("Transparent Test","",1)

do

$msg = GUIGetMsg()

If $msg = $trans then WinSetTrans("Transparent Test","",GUICtrlRead($trans))

works fine? :P


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

well i got it but theres one problem i couldn't fix don't have time to mess around, but here ya go

#include <GUIConstants.au3>
$Form1 = GUICreate("Transparent Test", 269, 58, 194, 125)
$Slider1 = GUICtrlCreateSlider(0, 8, 265, 49)
GUICtrlSetLimit(-1,255)
GUICtrlSetData(-1,220)
GUISetState()
While 1
WinSetTrans("Transparent Test","", GUICtrlRead($Slider1))
$msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
     EndSelect
WEnd
Edited by Vicks

[s]Autoit[/s]

Share this post


Link to post
Share on other sites

Once you fix the syntax on the Do loop, it works fine.

Share this post


Link to post
Share on other sites

So

#include <GUIConstants.au3>

AutoItSetOption("GUIResizeMode",802)

Global $oldwidth = 500, $oldheight = 100, $ontop = 1

GUICreate("Transparent Test",500,100,-1,-1,$WS_POPUP + $WS_SIZEBOX)

GUICtrlCreateLabel("",28,28,32,20,$SS_BLACKFRAME)

$trans = GUICtrlCreateSlider(60,37,73,18,$TBS_NOTICKS)

GUICtrlSetLimit(-1,255,80)

GUICtrlSetData(-1,220)

GUICtrlCreateLabel("Transparency:",70,25,100,12)

GUICtrlSetFont(-1,7)

$top = GUICtrlCreateCheckbox('"Always On Top"',28,50)

GUICtrlSetState(-1,1)

GUISetState()

WinSetTrans("Transparent Test","",220)

WinSetOnTop("Transparent Test","",1)

do

$msg = GUIGetMsg()

If $msg = $trans then WinSetTrans("Transparent Test","",GUICtrlRead($trans))

works fine? :P

obviously an "Until" is needed

Until $msg = $GUI_EVENT_CLOSE

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Ok how come the bigger it gets it gets more laggy.

I mean it flashes a black screen when i set the screen size bigger.


[center]Cookyx.com :: Simple LAN Chat[/center]

Share this post


Link to post
Share on other sites

Transparency is not cheap. Think about it, it takes two images (background, foreground) and blends them together.

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