vb.net 如何读取txt 显示於textbox?

txt文字档
id name email phone
1 abc [email protected] 12345678
空白
id name email phone
2 def [email protected] 12341234
空白
id name email phone
3 ghi [email protected] 56785678
空白

输出至textbox时变成
id name email phone
1 abc [email protected] 12345678
2 def [email protected] 12341234
3 ghi [email protected] 56785678

第1个回答  2012-03-21
Open YourFileName For Input As #1
Do While Not EOF(1) ' 循环至文件尾。
Line Input #1, TextLine ' 读入一行数据并将其赋予某变量。
if TextLine <> "" Then Text1.Text = Text1.Text & TextLine & vbCrLf
Loop
Close #1追问

我是程式新手
能有个可以让我直接跑的程式吗

相似回答