Jump to content
Sign in to follow this  
longxx

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

Recommended Posts

longxx

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
Airwolf

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
longxx

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
Zedna

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  

×

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.