Jump to content

Recommended Posts

Posted (edited)

i write a script ,and use edit and graph, every second will refresh the data of the edit and the graph.

i found the edit and the graph flash .

so i write a small example to show it.

is anybody can sovle the problem?

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 443, 192, 124)
$Label1 = GUICtrlCreateLabel("Label1", 5, 5, 636, 617)
GUICtrlSetFont(-1, 39, 400, 4) 
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

AdlibRegister("MyAdlib",100)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func MyAdlib()
    GUICtrlSetData($Label1,"Do you see the label flash? and how to sovle it ?")
EndFunc
Edited by gooker
Posted

the code is just a sample,i need to changed label data every second ,and it also have this problem, even just show the time .

@enaiman ,i use ,but also have the problem.

Posted (edited)

@thanubis ths

but this also have the problem

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 443, 192, 124)
$Label1 = GUICtrlCreateLabel("Label1", 5, 5, 636, 617)
GUICtrlSetFont(-1, 39, 400, 4)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

AdlibRegister("MyAdlib",500)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func MyAdlib()
    If GUICtrlRead($Label1) <> @SEC&"test test test test test test test test test test test test" Then GUICtrlSetData($Label1, @SEC&"test test test test test test test test test test test test")
EndFunc
Edited by gooker
Posted

  On 1/19/2010 at 6:06 AM, 'gooker said:

@thanubis ths

but this also have the problem

  On 1/22/2010 at 2:19 AM, 'zhuzb said:

I also have the same problem, who can solve the following?

:D

Try adding the $WS_EX_COMPOSITED style to the GUI:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 443, 192, 124, -1, $WS_EX_COMPOSITED)
$Label1 = GUICtrlCreateLabel("Label1", 5, 5, 636, 617)
GUICtrlSetFont(-1, 39, 400, 4)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

AdlibRegister("MyAdlib",500)
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func MyAdlib()
    If GUICtrlRead($Label1) <> @SEC&" test test test test test test test test test test test test" Then GUICtrlSetData($Label1, @SEC&" test test test test test test test test test test test test")
EndFunc

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...