③修改聯絡人窗體的**:dim objcn as connection
dim objrs as recordset
dim objcmd as command
dim list as listitem
'查詢要修改的聯絡人
private sub command2_click()
unload me
end sub
'刪除顯示的聯絡人
private sub command3_click()
dim a as integer
private sub listview1_beforelabeledit(cancel as integer)
cancel = true
end sub
'單擊listview中的任何乙個專案都會全選一行
private sub listview1_itemclick(byval item as mscomctllib.listitem)
text2.text = item.text
text3.text = item.subitems(1)
text4.text = item.subitems(2)
combo1.text = item.subitems(3)
text5.text = item.subitems(4)
text6.text = item.subitems(5)
text7.text = item.subitems(6)
text8.text = item.subitems(7)
end sub
'載入表頭
private sub form_load()
dim l1
listview1.gridlines = true
listview1.fullrowselect = true
listview1.view = lvwreport
set l1 = listview1.columnheaders.add(, , "編號", 0)
set l1 = listview1.columnheaders.add(, , "姓名", 1000)
set l1 = listview1.columnheaders.add(, , "年齡", 700)
set l1 = listview1.columnheaders.add(, , "性別", 700)
set l1 = listview1.columnheaders.add(, , "住宅**", 1300)
set l1 = listview1.columnheaders.add(, , "手機號碼", 1300)
set l1 = listview1.columnheaders.add(, , "家庭住址", 1400)
set l1 = listview1.columnheaders.add(, , "工作單位", 1800)
set objrs = new recordset
set objcn = new connection
set objcmd = new command
objcn.open "provider=microsoft.jet.oledb.4.0;data source=txl.mdb;persist security info=false"
picture1.visible = false
end sub
④查詢聯絡人視窗**:dim objrs as recordset
dim objcn as connection
dim objcmd as command
private sub command2_click()
unload me
end sub
private sub form_load()
dim l1
listview1.gridlines = true
listview1.fullrowselect = true
listview1.view = lvwreport
set l1 = listview1.columnheaders.add(, , "編號", 0)
set l1 = listview1.columnheaders.add(, , "姓名", 1000)
set l1 = listview1.columnheaders.add(, , "年齡", 700)
set l1 = listview1.columnheaders.add(, , "性別", 700)
set l1 = listview1.columnheaders.add(, , "住宅**", 1300)
set l1 = listview1.columnheaders.add(, , "手機號碼", 1300)
set l1 = listview1.columnheaders.add(, , "家庭住址", 1400)
set l1 = listview1.columnheaders.add(, , "工作單位", 1800)
set objrs = new recordset
set objcn = new connection
set objcmd = new command
objcn.open "provider=microsoft.jet.oledb.4.0;data source=txl.mdb;persist security info=false"
end sub
DEMO 通訊錄(三)
四 功能 主窗體 定義ado的模型物件,用來資料庫的連線和操作 dim objrs as recordset dim objcmd as command dim objcn as connection private sub cklxr click 檢視全部聯絡人 dim i as integer ...
單鏈表通訊錄 通訊錄2 0
單鏈表通訊錄 通訊錄2.0 標頭檔案 ifndef address h define address h include include include define success 10000 define failure 10001 define true 10002 define false ...
通訊錄問題
include using namespace std include include typedef struct lnodelnode,linklist 通訊錄的建立 void createlist l linklist l,int n createlist l 通訊者結點的插入 void li...