唉,人家给的思路都这样了还不能引玉?#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 620, 447, 192, 124)
$listview=GUICtrlCreateListView("文件名|大小(Kbyte)",10,10,600,400)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
file()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func file()
$seach = FileFindFirstFile(@WindowsDir&'\*.exe')
If $seach = -1 Then
MsgBox(1, "title", "无法打开文件")
Exit
EndIf
While 1
$file = FileFindNextFile($seach)
If @error Then ExitLoop
$filesize = int(FileGetSize(@WindowsDir&'\' & $file)/1024*1000)/1000
$list = $file & "|" & $filesize
$sr = GUICtrlCreateListViewItem($list, $listview)
WEnd
EndFunc ;==>file
|