找回密码
 加入
搜索
查看: 4679|回复: 5

[GUI管理] 【已解决】类滚动信息公告,如何循环实现整版滚动后暂停然后下一版

  [复制链接]
发表于 2011-2-2 16:17:43 | 显示全部楼层 |阅读模式
本帖最后由 touch_xu 于 2011-2-14 18:43 编辑


很多行的信息,类滚动信息公告,如何循环实现整版滚动后暂停然后下一版
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 263, 160, 192, 124)
$Label1 = GUICtrlCreateLabel("1.这里是滚动内容的第一行,实现整版滚动!"& @CRLF & "2.这里是滚动内容的第一行,实现整版滚动!", 8, 8, 241, 220)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-2-3 21:21:25 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $Label[6],$rI = 0
$Form1 = GUICreate("Form1", 263, 160)

$Botton = GUICtrlCreateButton("创建信息",10, 130 , 263- 20, 27)
GUISetState(@SW_SHOW)
 
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Botton
                        If $rI = 0 Then
                                For $i = 1 To 5
                                        $Label[$i] = GUICtrlCreateLabel($i &".这里是滚动内容的一行信息,实现整版滚动!", 8, ($i * 20), 270, 220)
                                Next
                                $rI = 1
                                GUICtrlSetData($Botton,"滚动吧!")
                        ElseIf $rI = 6 Then
                                MsgBox(0,"","已经到顶了,不用再滚了")
                        Else
                                For $i = 1 To 5
                                        GUICtrlSetPos($Label[$i],8 ,($i * 20) - (20 *$rI) )
                                Next
                                $rI += 1
                        EndIf
        EndSwitch
WEnd
发表于 2011-2-3 21:47:29 | 显示全部楼层
修改了下...实现自动滚动
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $Label[21],$rI = 0
$Form1 = GUICreate("Form1", 263, 160)
For $i = 1 To 20
        $Label[$i] = GUICtrlCreateLabel($i &".这里是滚动内容的一行信息,实现整版滚动!", 8, ($i * 20), 270, 220)
Next
GUISetState(@SW_SHOW)

Do
        Sleep(500)
    For $i = 1 To 20
                GUICtrlSetPos($Label[$i],8 ,($i * 20) - (20 *$rI) )
        Next
        $rI += 1
        If $rI = 21 Then
                MsgBox(0,"","滚动结束!")
                $rI = 22
        EndIf
Until $rI = 22
 楼主| 发表于 2011-2-14 18:43:25 | 显示全部楼层
十分感谢各位已OK
发表于 2011-12-8 22:48:44 | 显示全部楼层
收下,回家好好看看。。。。
发表于 2011-12-22 21:24:07 | 显示全部楼层
学习....有空再看
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-10-1 03:32 , Processed in 0.077363 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表