Sign in to follow this  
Followers 0
longxx

How to stop the flicker in GUI Window (with codes)

4 posts in this topic

hi all

I am making a GUI window to show game status, this is what I have so far (only core codes)

I know I should use GUICtrlSetData... but after reading the F1 help file I couldnt figure how to apply it

can anyone just give me some example lines how to make this happen?

thanks.

While 1
    global $status = _getName($hMem)
    
    Select
        Case $status = 17
        GUICtrlCreatelabel("17: In Channel", 50, 33, 120, 20)
        Case $status = 13
        GUICtrlCreatelabel("13: Searching", 50, 33, 120, 20)
        Case $status = 15
    EndSelect
    Sleep(100)
WEnd

Share this post


Link to post
Share on other sites



can anyone just give me some example lines how to make this happen?

;Create a Label
$label1 = GUICtrlCreatelabel("17: In Channel", 50, 33, 120, 20)

;Modify the Label Data
GuiCtrlSetData($label1, "New Label Data - will replace 17: In Channel")

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thank you Airwolf, it's working fine !

:)

EDIT:

After observing it for long time, I noticed the flicker is a LOT better than before, but since it's a lopp there is still slight change

is it way to make it only change when value is different? or is it unnecessary?

thanks

Edited by longxx

Share this post


Link to post
Share on other sites

Thank you Airwolf, it's working fine !

:)

EDIT:

After observing it for long time, I noticed the flicker is a LOT better than before, but since it's a lopp there is still slight change

is it way to make it only change when value is different? or is it unnecessary?

thanks

global $status, $status_old 

While 1
    $status = _getName($hMem)
        If $status <> $status_old Then
        GUICtrlSetData($label, $status & ": In Channel")
        $status_old = $status
    EndIf
        Sleep(100)
WEnd

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