vb 把listview1(两列) 多选的内容通过command按钮移动到listview2
Private Sub Form_Load()
SQL = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=Description=系统库;DRIVER=SQL Server;SERVER=" & ip & ";UID=sa;PWD=123456;APP=Visual Basic;WSID=20100910-1506;DATABASE=" & kk & ""
Adodc1.ConnectionString = SQL
SQL = "select * from smb"
Adodc1.RecordSource = SQL
Adodc1.Refresh
ListView1.ColumnHeaders.Add , , "字段", ListView1.Width / 2
ListView1.ColumnHeaders.Add , , "长度", ListView1.Width / 2
ListView1.View = lvwReport
ListView1.GridLines = True
For i = 0 To Adodc1.Recordset.Fields.Count - 1
ListView1.ListItems.Add , , Adodc1.Recordset.Fields.Item(i).Name
ListView1.ListItems(i + 1).SubItems(1) = Trim(Str$(Adodc1.Recordset.Fields.Item(i).DefinedSize))
Next i
ListView2.ColumnHeaders.Add , , "字段", ListView1.Width / 2
ListView2.ColumnHeaders.Add , , "长度", ListView1.Width / 2
End Sub
然后添加按钮功能,把ListView1中的多选内容移动到ListView2中
[解决办法]
急啊,在线等。。。