#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$x = "5"
$y = "8"
$s = "97"
Global $gui
Local $pic[$s+1]
$Form1 = GUICreate("form", 629, 269, 193, 113)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
_du()
While 1
$nMsg = GUIGetMsg()
For $i = 1 To $s
Switch $nMsg
Case $Pic[$i]
MsgBox(0,"提示","按钮:"&GUICtrlRead($Pic[$i]))
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Next
WEnd
Func _du()
For $i = 1 To 97
$Pic[$i] = GUICtrlCreateButton($i, $x, $y, 26, 26, $BS_BITMAP)
$x = $x+33
If $x = 632 Then
$x = "5"
$y =$y+33
EndIf
Next
EndFunc
不知道符不符合你的要求!! |