#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form = GUICreate("Form1", 429, 155, 192, 124)
$Button_icon_his = GUICtrlCreateButton("Button1", 216, 48, 137, 41)
Global $si, $his_list
GUISetState(@SW_SHOW)
$Form1 = GUICreate("his", 90, 760, 1050, 24)
$his_list = GUICtrlCreateList("icon his", 1, 1, 87, 759)
GUICtrlSetLimit(-1, 200) ; 限制水平滚动
GUISetState(@SW_SHOW)
GUISwitch($Form)
While 1
$nMsg = GUIGetMsg(1)
Switch $nMsg[0]
Case $nMsg[0] = $GUI_EVENT_CLOSE
If $nMsg[1] = $Form Then
MsgBox(0, "提示", "主窗口关闭")
Exit
ElseIf $nMsg[1] = $Form1 Then
MsgBox(0, "提示", "子窗口关闭")
GUIDelete($Form1)
EndIf
Case $nMsg[0] = $Button_icon_his
_main()
EndSwitch
WEnd
Func _main()
$si += 1
If Mod($si, 5) = 0 Then
GUICtrlSetData($his_list, $si)
EndIf
EndFunc ;==>_main |