VB打开txt文件

来源:百度知道 编辑:UC知道 时间:2024/05/22 10:26:09
Private Sub Form_Load()
Dim x As String
Open App.Path & "\版本说明.txt" For Input As #1
Input #1, x
Text1.Text = x
End Sub
为什么结果总是只出来一行啊.我把text设置成了可以显示多行文本啊.

Private Sub Form_Load()
Text1.MultiLine = True
Dim x As String
Open App.Path & "\版本说明.txt" For Input As #1
Input #1, x
Text1.Text = Input(LOF(1), 1)
End Sub

还要设置Text的ScrollBars属性,你把这个属性的值设为3就可以了哈