本帖最后由 tryhi 于 2012-7-9 01:13 编辑
横向滚动
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 500, 300, 192, 124)
$Label1 = GUICtrlCreateLabel("横向滚动", 0, 100, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
For $i = 1 To 500
GUICtrlSetPos($Label1, $i, 100)
Sleep(10)
Next
Sleep(100)
WEnd
波浪形滚动
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 500, 300, 192, 124)
$Label1 = GUICtrlCreateLabel("Label1", 0, 100, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
For $x = 1 To 500
$y = 30 * Sin(0.05 * $x)
GUICtrlSetPos($Label1, $x, 100 + $y)
Sleep(10)
Next
Sleep(10)
WEnd
圆形滚动#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 500, 300, 192, 124)
$Label1 = GUICtrlCreateLabel("Label1", 0, 100, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
For $x = -100 To 100
$y = Sqrt(100 ^ 2 - $x ^ 2)
GUICtrlSetPos($Label1, $x + 100, 100 + $y)
Sleep(10)
Next
For $x = 100 To -100 Step -1
$y = Sqrt(100 ^ 2 - $x ^ 2)
GUICtrlSetPos($Label1, $x + 100, 100 - $y)
Sleep(10)
Next
Sleep(10)
WEnd
|