怎么用VB在textbox中显示txt里的多行数据

fileno = FreeFile
Open App.Path & "/score.txt" For Input As #fileno
Do While Not EOF(fileno)

Line Input #fileno, textline
Text1.Text = textline
Loop
Close #fileno
能把这个读入一行的改成多行的吗

设置文本框的MultiLine属性为true, 如截图所示:

追问

fileno = FreeFile
Open App.Path & "/score.txt" For Input As #fileno
Do While Not EOF(fileno)

Line Input #fileno, textline
Text1.Text = textline
Loop
Close #fileno
这是我现在的程序,怎么改成读多行啊

追答

Text1.Text = Text1.text + textline +chr(13) ' chr(13) 是回车符

追问

太棒了,谢谢

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-06-26
设置MuitLine属性为True