Jump to content

Transperency not working.


Recommended Posts

#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]

Link to comment
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]

Link to comment
Share on other sites

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]
Link to comment
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

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...