Sign in to follow this  
Followers 0
devilyn

Flicker Label

3 posts in this topic

I'm trying to determine the cause of a label flicker in my script but with no luck.

any clues?

$hWnd = GUICreate("Show Clock", 500, 200, -1, -1)
GUISetFont(80, 400, 0, "Quartz DB")

GUISetBkColor(0x020202)
$ClockLab = GUICtrlCreateLabel("00:00:00", 80, 30, 432, 124)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetColor(-1,0x3c3c3c)


GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
ActivateClock($ClockLab)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
    Sleep(100)
    DrawDigit($ClockLab,@HOUR&":"&@MIN&":"&@SEC)
WEnd


Func DrawDigit($ControlID, $Value)
    GUICtrlSetData($ControlID, $Value)
EndFunc   ;==>DrawDigit

Func ActivateClock($ControlID)
    GUICtrlSetColor($ControlID, 0x05e3ff)
EndFunc

Share this post


Link to post
Share on other sites



Try changing this:

Func DrawDigit($ControlID, $Value)
    If GUICtrlRead($ControlID) <> $Value then GUICtrlSetData($ControlID, $Value)
EndFunc   ;==>DrawDigit

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

WORKING THX!!!!

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