|
楼主 |
发表于 2010-1-19 22:33:51
|
显示全部楼层
问题已解决 感谢Sxd
代码如下:
#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Dim $i,$Form1,$Label[11]
$Form1 = GUICreate("Form1", 233, 354, 193, 115)
GUISetOnEvent($GUI_EVENT_CLOSE, "ExitMe")
For $i=1 To 10
$Label[$i] = GUICtrlCreateLabel("dddd" & $i, 10+$i*5, 20+$i*30)
GUICtrlSetOnEvent($Label[$i], "lab")
Next
GUISetState(@SW_SHOW)
While 1
Sleep(1000)
WEnd
Func lab()
MsgBox(0,0,GUICtrlRead(@GUI_CtrlId))
EndFunc
Func ExitMe()
Exit
EndFunc |
|