#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <GuiListView.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>
_SQLite_Startup ()
$SQLite_Data_Path = "SQLite.db"
$Tablekj = "kaojuan"
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("运算", 478, 412, 481, 210)
GUISetFont(11, 400, 0, "宋体")
Global $ListView1 = GUICtrlCreateListView("序号|菜单", 8, 8, 458, 358)
Local $buttoncontext = GUICtrlCreateContextMenu($ListView1)
Global $MenuItem2 = GUICtrlCreateMenu("移动到...", $buttoncontext)
Local $tj = GUICtrlCreateMenuItem("管理一", $MenuItem2);从数据库获取
Local $bj = GUICtrlCreateMenuItem("管理二", $MenuItem2);从数据库获取
Local $Cj = GUICtrlCreateMenuItem("管理三", $MenuItem2);从数据库获取
KC_lvdraw()
Global $Input1 = GUICtrlCreateInput("", 173, 376, 97, 23)
Global $Label1 = GUICtrlCreateLabel("得数:", 125, 381, 45, 19)
Global $Button1 = GUICtrlCreateButton("确定", 293, 376, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Local $a = GUICtrlRead($Input1)
Case $tj
MsgBox(0,'提示','管理一');提取所单击的文本
Case $bj
MsgBox(0,'提示','管理二')
Case $cj
MsgBox(0,'提示','管理三')
EndSwitch
WEnd
Func KC_lvdraw()
_GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ListView1))
Local $Irval, $Aresult, $Irows, $Icolumns
$Irval = _SQLite_GetTable2d( _SQLite_Open ($SQLite_Data_Path), "select rowid,* from caidan;", $Aresult, $Irows, $Icolumns)
_ArrayDelete($aresult, 0)
_GUICtrlListView_AddArray($ListView1, $Aresult)
EndFunc