Private Sub Command1_Click()
Dim str As String
Open "D:\1.txt" For Input As #1
Input #1, str
Text1.Text = str
Close #1
End Sub
上面的代码只能显示txt的第一行的内容,那我想显示第二行、三行、四行、五行。。。
怎么改啊!?
Private Sub Command1_Click()
Dim str As String
Open "D:\1.txt" For Input As #1
Input #1, str
Text1.Text = str
Close #1
End Sub
上面的代码只能显示txt的第一行的内容,那我想显示第二行、三行、四行、五行。。。
怎么改啊!?
Private Sub Command1_Click()
Dim str As String
Open "D:\1.txt" For Input As #1
Do While not eof(1)
Input #1, str
Text1.Text = Text1.Text & str & vbctrl
Loop
Close #1
End Sub
Private Sub Command1_Click() Dim str As String
dim i as integer
i=1 Open "D:\1.txt" For Input As #1
Do While not eof(1) Input #1, str
i=i+1 if i==2 then
Text1.Text = str
end if
Loop Close #1
End Sub