找回密码
 加入
搜索
查看: 3581|回复: 2

[GUI管理] [已解决]鼠标在ListView的项目或滚动条……上按下,会暂停执行,怎么让它不暂停?

[复制链接]
发表于 2015-3-12 14:04:38 | 显示全部楼层 |阅读模式
本帖最后由 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
发表于 2015-3-12 14:23:00 | 显示全部楼层
#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
 楼主| 发表于 2015-3-13 10:57:43 | 显示全部楼层
谢谢版主.....
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-18 12:12 , Processed in 0.076732 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表