我有一个列表框...我的列表框有多个项目..如果我选择多个项目我想在消息框中同时显示多个项目..我的代码如下:
cnt = LSTlocations.SelectedItems.Count
Dim list As New List(Of Integer)
Dim locid As Integer
If cnt > 0 Then
For i = 0 To cnt - 1
Dim locationanme As String = LSTlocations.SelectedItems(i).ToString
locid = RecordID("Locid", "Location_tbl", "LocName", locationanme)
list.Add(locid)
Next
For Each num In list
MessageBox.Show("LocID:" & num)
Next
现在每次我在消息框中获取每个值..我想同时获取所有值..我该怎么做?