Jump to content

Flicker Label


devilyn
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Developers

Try changing this:

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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