Jump to content
Sign in to follow this  
turbox

Help with guictrlsetblcolor

Recommended Posts

turbox

I have this script but i don't know why it doesn't work:

#include <GUIConstantsEx.au3>

Opt("GUIOnEventMode", 1)
$sleep = 2444
$Form1 = GUICreate("Form1", 136, 165, 193, 125)
$b = GUICtrlCreateLabel("Local2", 24, 64, 84, 36)
GUICtrlSetFont(-1, 22, 400, 0, "MS Sans Serif")
$a = GUICtrlCreateLabel("Local1", 24, 16, 84, 36)
GUICtrlSetFont(-1, 22, 400, 0, "MS Sans Serif")
$c = GUICtrlCreateLabel("Local3", 24, 112, 84, 36)
GUICtrlSetFont(-1, 22, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
GUISetOnEvent(-3, "exitgui")
$v1 = 0
$v2 = 0
$v3 = 1
$alltog = $v1 & $v2 & $v3
While 1
    _setlab($alltog)
    sleep($sleep)
WEnd
Func _setlab($only)
    For $i = 1 To $i = 3 Step 1
        $num = StringMid($only, $i, 1)
        Switch $i
            Case 1
                $lab = $a
            Case 2
                $lab = $b
            Case 3
                $lab = $c
        EndSwitch
        If $num = 1 Then
            $col = 0x0054E3
        Else
            $col = 0xD8E4F8
        EndIf
        GUICtrlSetBkColor($lab, $col)
    Next
EndFunc ;==>_settext
Func exitgui()
    exit
EndFunc

somebody who can help?

Edited by vakis

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.