[已解决]鼠标在ListView的项目或滚动条……上按下,会暂停执行,怎么让它不暂停?
本帖最后由 zhouhaijin 于 2015-3-13 10:58 编辑鼠标在ListView的项目或滚动条……上按下,会暂停执行,怎么让它不暂停?
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Local $i
GUICreate("listview items", 220, 250, 100, 200, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
$listview = GUICtrlCreateListView("col_1|col_2|col_3", 10, 10, 200, 150)
$Label1 = GUICtrlCreateLabel("", 90, 190, 80, 30)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
GUISetState()
While 1
$i += 1
GUICtrlCreateListViewItem("item1_" & $i & "|item2_" & $i & "|item3_" & $i & "", $listview)
GUICtrlSetData($Label1, $i)
Sleep(1000)
WEnd
Func _exit()
Exit
EndFunc ;==>_exit #include <Timers.au3>
Opt('GUIOnEventMode', 1)
Local $i
Local $hGUI = GUICreate('listview items', 220, 250, 100, 200, -1)
GUISetOnEvent(-3, '_exit')
$listview = GUICtrlCreateListView('col_1|col_2|col_3', 10, 10, 200, 150)
$Label1 = GUICtrlCreateLabel('', 90, 190, 80, 30)
GUICtrlSetFont(-1, 15, 400, 0, 'MS Sans Serif')
GUISetState()
_Timer_SetTimer($hGUI, 1000, '_Timer')
While 1
Sleep(1000)
WEnd
Func _Timer($1, $2, $3, $4)
$i += 1
GUICtrlCreateListViewItem('item1_' & $i & '|item2_' & $i & '|item3_' & $i & '', $listview)
GUICtrlSetData($Label1, $i)
EndFunc ;==>_Timer
Func _Exit()
Exit
EndFunc ;==>_exit 谢谢版主.....
页:
[1]