gooker Posted January 19, 2010 Share Posted January 19, 2010 (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 January 19, 2010 by gooker Link to comment Share on other sites More sharing options...
enaiman Posted January 19, 2010 Share Posted January 19, 2010 ControlSetText instead of GUICtrlSetData SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
gooker Posted January 19, 2010 Author Share Posted January 19, 2010 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. Link to comment Share on other sites More sharing options...
gooker Posted January 19, 2010 Author Share Posted January 19, 2010 (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 January 19, 2010 by gooker Link to comment Share on other sites More sharing options...
zhuzb Posted January 22, 2010 Share Posted January 22, 2010 I also have the same problem, who can solve the following? Link to comment Share on other sites More sharing options...
ResNullius Posted January 22, 2010 Share Posted January 22, 2010 @thanubis ths but this also have the problem I also have the same problem, who can solve the following? 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now