#include <ButtonConstants.au3>
#Include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GUIListBox.au3>
#include <SQLITE.au3>
#include <SQLITE.DLL.au3>
#Include <WinAPI.au3>
Global $iRows, $iColumns, $iRval
Global $Msg, $hQuery
$DB=@ScriptDir&"\MyDate.db"
_SQLite_Startup()
_SQLite_Open($DB)
$Form1 = GUICreate("xx", 535, 454, 193, 115)
GUISetBkColor(0xECE9D8)
$GUI_ListBox = GUICtrlCreateListView("", 2,20, 530, 390, 0x0010,BitOR($LVS_LIST,$LVS_SINGLESEL,$LVS_EX_GRIDLINES))
_GUICtrlListView_AddColumn($GUI_ListBox, "序号", 50, 0)
_GUICtrlListView_AddColumn($GUI_ListBox, " 日期 ",95, 1)
_GUICtrlListView_AddColumn($GUI_ListBox, "ID " ,80, 1)
_GUICtrlListView_AddColumn($GUI_ListBox, " IP " ,100, 1)
_GUICtrlListView_AddColumn($GUI_ListBox, "MAC " ,80, 1)
_GUICtrlListView_AddColumn($GUI_ListBox, " 数据 " ,60, 1)
_GUICtrlListView_AddColumn($GUI_ListBox, "备注 " ,60, 1)
$Button1 = GUICtrlCreateButton("压缩数据", 150, 420, 110, 25)
$Button2 = GUICtrlCreateButton("删除数据",290, 420, 113, 25)
GUICtrlSetBkColor ($GUI_ListBox,0xffffff)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("「梦中的猫头鹰」制作", 410, 437, 240, 15)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState()
While 1
$Msg = GUIGetMsg()
Select
Case $Msg = $GUI_EVENT_CLOSE
_SQLite_Shutdown ()
ExitLoop
Case $Msg = $Button1
SQlRead()
Case $Msg = $Button2
EndSelect
WEnd
Func SQlRead()
_GUICtrlListView_DeleteAllItems ( GUICtrlGetHandle ($GUI_ListBox) )
_SQLite_Open ($DB)
_SQLite_Query(-1, "SELECT * FROM MTY;",$hQuery)
******************************
EndFunc
这个func 该如何写 才能 把 表里的数据 全部 显示到 $GUI_ListBox 上呢??我写的 只在第一格显示。。额。闹了1天了。afan 帮帮我?