2012-12-01 42 views
0

我想將列表視圖項及其子項轉移到VB.net中的列表框中。
這是我的代碼,但它似乎並沒有爲我工作。子類屬性在輸入語法時未能彈出。我錯過了什麼嗎?將列表視圖項轉移到VB.NET中的列表框中

ListBox1.Items.Add(Item.Text & " " & Item.SubItems(1).Text & " " & Item.SubItems(2).Text) 

回答

0

如何在您的代碼中聲明'Item'?

下正常工作:

Dim item As ListViewItem = ListView1.SelectedItems(0) 
ListBox1.Items.Add(item.Text & " " & item.SubItems(1).Text & " " & item.SubItems(2).Text) 
+0

噢!我明白了。非常感謝。我很感激。 :) – SamuelDexter

0
FOR I=0 TO 10 
Dim item As ListViewItem = ListView1.SelectedItems(0) 
ListBox1.Items.Add(item.Text & " " & item.SubItems(1).Text & " " & item.SubItems(2).Text) 
NEXT 
相關問題