Jump to content
Sign in to follow this  
ashley

Slider and WinSetTrans

Recommended Posts

ashley

ok i have forgotten how to make a slider change the transparency.

Can anybody tell me how

For excample

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Set transparency.", 345, 80, 191, 109)
$Slider1 = GUICtrlCreateSlider(32, 32, 281, 41)
$Label1 = GUICtrlCreateLabel("Move the Slider Across the bar to make the window more transparent", 8, 8, 329, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Slider1
        ;needs to set the window transparency.
    EndSwitch
WEnd

please help

thanks..

Share this post


Link to post
Share on other sites
Monamo

ok i have forgotten how to make a slider change the transparency.

please help

...

(code clipped)

...

thanks..

Try

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Set transparency.", 345, 80, 191, 109)
$Slider1 = GUICtrlCreateSlider(32, 32, 281, 41)
$Label1 = GUICtrlCreateLabel("Move the Slider Across the bar to make the window more transparent", 8, 8, 329, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUICtrlSetLimit($Slider1, 5, 1)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Slider1
            $TransLevel = GUICtrlRead($Slider1)
            Switch $TransLevel
                Case 1
                    WinSetTrans($Form2, "", 255)
                Case 2
                    WinSetTrans($Form2, "", 200)
                Case 3
                    WinSetTrans($Form2, "", 150)
                Case 4
                    WinSetTrans($Form2, "", 100)
                Case 5
                    WinSetTrans($Form2, "", 50)
            EndSwitch
    EndSwitch
WEnd

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites
ashley

Try

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Set transparency.", 345, 80, 191, 109)
$Slider1 = GUICtrlCreateSlider(32, 32, 281, 41)
$Label1 = GUICtrlCreateLabel("Move the Slider Across the bar to make the window more transparent", 8, 8, 329, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUICtrlSetLimit($Slider1, 5, 1)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Slider1
            $TransLevel = GUICtrlRead($Slider1)
            Switch $TransLevel
                Case 1
                    WinSetTrans($Form2, "", 255)
                Case 2
                    WinSetTrans($Form2, "", 200)
                Case 3
                    WinSetTrans($Form2, "", 150)
                Case 4
                    WinSetTrans($Form2, "", 100)
                Case 5
                    WinSetTrans($Form2, "", 50)
            EndSwitch
    EndSwitch
WEnd
thanks...

Share this post


Link to post
Share on other sites
Monamo

thanks...

np - I'd likely go with a higher "max" on the slider and increase the transparency in smaller increments, but I figured this would at least get ya rollin'

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites
ashley

np - I'd likely go with a higher "max" on the slider and increase the transparency in smaller increments, but I figured this would at least get ya rollin'

can u help me on my other post...

just posted it in General Help and Support

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  

×