![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
VB.NET combobox的items值绑定txt文本文档,文本文档中可以任意添加,对饮combobox的也增加
1个回答
展开全部
Private Sub Add()
Using Txt As New StreamReader("C:\Users\Administrator\Desktop\新建文本文档.txt", Encoding.Default, True)
Dim str As String = Txt.ReadLine
While str <> Nothing
ComboBox1.Items.Add(str)
str = Txt.ReadLine
End While
Txt.Close
End Using
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询