
vb,怎样在加载窗体时把另一文件内容显示在文本框中
2个回答
展开全部
用读写数据的方法
比方说:
Private Sub form_load()
'这里别忘在属性栏里设置Text1.MultiLine = True
Text1.Text = ""
Dim a As String
Open "h:\test.txt" For Input As #1
Do Until EOF(1)
Line Input #1, a
Text1.Text = Text1.Text & a & vbCrLf
Loop
Close #1
End Sub
我试过了··可以的··
比方说:
Private Sub form_load()
'这里别忘在属性栏里设置Text1.MultiLine = True
Text1.Text = ""
Dim a As String
Open "h:\test.txt" For Input As #1
Do Until EOF(1)
Line Input #1, a
Text1.Text = Text1.Text & a & vbCrLf
Loop
Close #1
End Sub
我试过了··可以的··
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询