我想一行一行的读取.rtf 文件的内容怎么办呢?
Private Sub Command1_Click()
Dim ind As Integer
Dim str1 As String, str2 As String, str3 As String, str4 As String
ind = InStr(1, RichTextBox1.Text, vbCrLf)
str1 = Left(RichTextBox1.Text, ind)
ind = InStr(ind, RichTextBox1.Text, vbCrLf)
str2 = Mid(RichTextBox1.Text, ind)
ind = InStr(1, RichTextBox2.Text, vbCrLf)
str3 = Left(RichTextBox2.Text, ind)
ind = InStr(ind, RichTextBox2.Text, vbCrLf)
str4 = Mid(RichTextBox2.Text, ind)
RichTextBox3.Text = RichTextBox3.Text & str1
RichTextBox3.Text = RichTextBox3.Text & str3
RichTextBox3.Text = RichTextBox3.Text & str2
RichTextBox3.Text = RichTextBox3.Text & str4
End Sub
Private Sub Form_Load()
RichTextBox1.Text = "白日依山尽" & vbCrLf & "欲穷千里目"
RichTextBox2.Text = "黄河入海流" & vbCrLf & "更上一层楼"
RichTextBox3.Text = ""
End Sub