本帖最后由 水木子 于 2012-5-5 21:42 编辑
#include <Constants.au3>
#include <WindowsConstants.au3>
Global $aButton[1000] ;总数
Global $iNumber = 100 ;每行数量
Global $iSpacingX = 9, $iSpacingY = 9 ;垂直、水平,间距
Global $iY = 0
Opt('GUIOnEventMode', 1)
$Form1 = GUICreate('', 298, 91)
GUISetOnEvent(-3, '_Events')
GUISetState()
$Form2 = GUICreate('', 910, 200, 0, 10, $WS_CHILD, $WS_EX_ACCEPTFILES, $Form1)
For $i = 0 To UBound($aButton) - 1
$aButton[$i] = GUICtrlCreateLabel('', $iSpacingX * Mod($i, $iNumber), $iSpacingY * Floor($i / $iNumber), 10, 10, $WS_BORDER)
If Random(1, 5, 1) = 1 Then GUICtrlSetBkColor(-1, 0xFF0000)
Next
GUISetState()
While 1
WinMove($Form2, '', $iY, 0)
$iY -= 9
Sleep(500)
WEnd
Func _Events()
Switch @GUI_CtrlId
Case -3
Exit
EndSwitch
EndFunc ;==>_Events
|