2013-06-06 18 views
0

我在vb.net編程。 它使用線程做一些工作。 我現在的問題是,我有一個列表視圖與其中的一些數據,一些產品需要從這個列表視圖,特別是從一個子項目。VB.NET如何獲得線程中的子項目的文本?

現在我的問題是,我怎麼能從線程安全方式的ListView中獲取數據? 我想這

Delegate Sub d_getitem(ByVal lst As ListView, ByVal index As Integer, ByVal subitemid As Integer) 
Function getitem(ByVal lst As ListView, ByVal index As Integer, ByVal subitemid As Integer) 

Return lst.Items(index).SubItems(subitemid).Text 
End Function 

然後叫通過

Dim old = ListView1.Invoke(New d_getitem(AddressOf getitem), ListView1, id, 10) 

,但它不可能有返回 任何人可以幫助我:)

問題解決

就必須改變委託類型的功能;)

+0

考慮添加自己的答案,將其標記爲正確所以這個問題是解決被顯示。 – SysDragon

回答

0

問題解決

就不得不改變委託類型的功能;)

相關問題