今天刚看了解这个语言
觉得很方便
就试着写个任务管理器的界面
#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[0][0]
_GUICtrlListView_AddItem($ListView1,$list[$i][0],0)
_GUICtrlListView_SetItemText($ListView1, $list[0][0] - $i, 1, $list[$i][1])
next
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $ListView1
EndSwitch
WEnd
但后面的PID显示不出来
请问我错在哪?
[ 本帖最后由 liuak 于 2008-7-14 11:38 编辑 ] |