求助!!!!!!!!!!!!!!!!!!!!!!!!!!!!
vb.net吧
全部回复
仅看楼主
level 1
董鑫9230 楼主
Using sr As IO.StreamReader = New IO.StreamReader("123.txt")
Dim line As String = String.Empty
Do While line IsNot Nothing
line = sr.ReadLine()
If line <> "" Then ComboBox1.Items.Add(line)
Loop
sr.Close()
End Using
Dim f = My.Computer.FileSystem.OpenTextFileReader("C:\Documents and Settings\Administrator\桌面\328 vb\WindowsApplication1\123.txt")
Do While Not f.EndOfStream()
ComboBox1.Items.Add(f.ReadLine)
Loop
f.Close()
这段代码的目的是想把txt的数据导进combobox中
对不对啊???????????????????
2012年04月03日 07点04分 1
level 12
Using sr As New System.IO.StreamReader("path", System.Text.Encoding.GetEncoding("GB2312"))
Dim Com As New ComboBox
Do While Not sr.EndOfStream
Com.Items.Add(sr.ReadLine)
Loop
sr.Close()
End Using
2012年04月04日 09点04分 2
1