pchome2000 发表于 2010-11-16 11:59:31

[已解决]如何实现标签不闪动??

本帖最后由 pchome2000 于 2010-11-16 13:18 编辑

执行以下的代码时,标签闪动,如何实现标签不闪动??


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


$Form1 = GUICreate("Form1", 623, 442, 192, 124, $WS_POPUP,$WS_EX_TOPMOST)
$Label1 = GUICtrlCreateLabel("aaaaaaaaaaa", 56, 96, 372, 17)
GUICtrlSetFont(-1, 11, 400, 0, "宋体")
GUISetState(@SW_SHOW)


AdlibRegister("abc",1000)


Func abc()
$avArray = "."
$avArray = ".."
$avArray = "..."
$avArray = "...."
$avArray = "....."
        WinSetTrans("GUIMsgbox", "", 210)
        $i = 0
        Do
                $i = $i + 1
                $Label1 = GUICtrlCreateLabel("aaaaaaaaaaa" & $avArray[$i], 56, 96, 372, 17)
                GUICtrlSetFont(-1, 11, 400, 0, "宋体")
                Sleep(800)
                GUICtrlDelete($GUIMsgbox_Msg1)
                If $i = 5 Then ExitLoop
        Until $i >= 5
       
EndFunc

蜘蛛抱蛋 发表于 2010-11-16 12:32:04

这个本论坛好象没有解决办法,你去官网用flicker做关键词搜搜看

afan 发表于 2010-11-16 12:34:21

GUICtrlSetData

pchome2000 发表于 2010-11-16 13:20:10

已解决,代码如下:#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 623, 442, 192, 124, $WS_POPUP,$WS_EX_TOPMOST)
$Label1 = GUICtrlCreateLabel("aaaaaaaaaaa", 56, 96, 372, 17)
GUICtrlSetFont(-1, 11, 400, 0, "宋体")
GUISetState(@SW_SHOW)


AdlibRegister("abc",1000)


Func abc()
$avArray = "."
$avArray = ".."
$avArray = "..."
$avArray = "...."
$avArray = "....."
      WinSetTrans("GUIMsgbox", "", 210)
      $i = 0
      Do
                $i = $i + 1
                GUICtrlSetData($Label1, "aaaaaaaaaaa" & $avArray[$i])
                GUICtrlSetFont(-1, 11, 400, 0, "宋体")
                Sleep(800)
                GUICtrlDelete($GUIMsgbox_Msg1)
                If $i = 5 Then ExitLoop
      Until $i >= 5
      
EndFunc

yhxhappy 发表于 2010-11-16 22:44:09

本帖最后由 yhxhappy 于 2010-11-16 22:54 编辑

A版已经说得很清楚了,楼主还要绕那么多。
而且你贴的代码也有很多问题,也可能是我没明白楼主想要的效果吧。#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 623, 442, 192, 124, $WS_POPUP,$WS_EX_TOPMOST)
$Label1 = GUICtrlCreateLabel("", 56, 96, 372, 17)
GUICtrlSetFont(-1, 11, 400, 0, "宋体")

WinSetTrans($Form1, "", 210)
GUISetState(@SW_SHOW)

$txt = "aaaaaaaaaaa"
For $i = 1 To 7
        GUICtrlSetData($Label1, $txt)
        Sleep(800)
        $txt &= "."
Next
页: [1]
查看完整版本: [已解决]如何实现标签不闪动??