创建一个任务管理器界面
今天刚看了解这个语言觉得很方便
就试着写个任务管理器的界面
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include<GuilistView.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 307, 344, 193, 125)
$Group1 = GUICtrlCreateGroup("进程列表", 8, 8, 289, 313)
$ListView1 = GUICtrlCreateListView("", 16, 24, 273, 289)
; Add columns
_GUICtrlListView_InsertColumn($ListView1, 0, "进程",150)
_GUICtrlListView_InsertColumn($ListView1, 1, "PID",80)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $m_list
$list = ProcessList()
for $i = 1 to $list
_GUICtrlListView_AddItem($ListView1,$list[$i],0)
_GUICtrlListView_SetItemText($ListView1, $list - $i, 1, $list[$i])
next
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ListView1
EndSwitch
WEnd
但后面的PID显示不出来
请问我错在哪?
[ 本帖最后由 liuak 于 2008-7-14 11:38 编辑 ] #include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include<GuilistView.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 307, 344, 193, 125)
$Group1 = GUICtrlCreateGroup("进程列表", 8, 8, 289, 313)
$ListView1 = GUICtrlCreateListView("", 16, 24, 273, 289)
; Add columns
_GUICtrlListView_InsertColumn($ListView1, 0, "进程",150)
_GUICtrlListView_InsertColumn($ListView1, 1, "PID",80)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $m_list
$list = ProcessList()
for $i = 1 to $list
GUICtrlCreateListViewItem($list[$i] &"|"&$list[$i],$ListView1)
;~ _GUICtrlListView_SetItemText($ListView1, $list - $i, 1, $list[$i])
next
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ListView1
EndSwitch
WEnd 还是运行出错啊
R6002
floating pointsupport not loaded for $i = 1 to $list
_GUICtrlListView_AddItem($ListView1,$list[$i],0)
;~ _GUICtrlListView_SetItemText($ListView1, $list - $i, 1, $list[$i])
_GUICtrlListView_AddSubItem($ListView1,$i-1,$list[$i],1)
next 原帖由 pcbar 于 2008-7-13 20:27 发表 http://www.autoitx.com/images/common/back.gif
for $i = 1 to $list
_GUICtrlListView_AddItem($ListView1,$list[$i],0)
;~ _GUICtrlListView_SetItemText($ListView1, $list - $i, 1, $list[$i])
_GUICtrlListView_AddSubItem($ListView1,$ ...
谢谢斑竹
太感谢了 不错,学习了......
页:
[1]