0
我想从Visual Basic中的列表框中读取所有选定的项目。VB ListBox.Items抛出编译错误
Dim x As Integer
Dim testValue As String
testValue = "20"
For x = 0 To Me.ListBox1.Items.Count() - 1
If Me.ListBox1.Items.Item(x) = testValue Then
MessageBox.Show ("Found it")
Exit Sub
End If
Next x
是我想要的代码。但是当我运行代码,我得到“编译错误: 方法或数据成员未找到”
我想我缺少一些引用使用“ListBox.Items”方法的权利? 什么是必需的参考文献/图书馆。
谢谢!
嗨,布赖恩,当我运行代码时,我得到“编译错误:找不到方法或数据成员”。你能分享一下你在项目中使用的参考文献吗? – narayanan 2011-04-18 16:19:04