【已解决】类滚动信息公告,如何循环实现整版滚动后暂停然后下一版
本帖最后由 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
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $Label,$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 修改了下...实现自动滚动#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $Label,$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 十分感谢各位已OK 收下,回家好好看看。。。。 学习....有空再看
页:
[1]