先行谢过回答的好人!!
在按下第二个按钮时在文本最前接一个回车符。。
Dim strLine() As String
Dim llCount As Long
Dim llCounts As Long
Dim llLetterS As Long
Dim llLetter As Long
Private Sub cmdContine_Click()
If Timer1.Enabled = False Then
Timer1.Enabled = True
Else
Timer1.Enabled = False
End If
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdRead_Click()
rTxtTest.FileName = App.Path & "/test.txt"
End Sub
Private Sub cmdStart_Click()
strLine = Split(rTxtTest.Text, vbCr)
llCounts = UBound(strLine) - LBound(strLine)
llCount = LBound(strLine)
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
rTxtTest.Text = ""
Timer1.Enabled = False
txtOut= ""
End Sub
Private Sub Timer1_Timer()
If llCount > llCounts Then
txtOut = txtOut & "程序执行结束"
Timer1.Enabled = False
Exit Sub
End If
If llLetter = Len(strLine(llCount)) Then
llCount = llCount + 1
llLetter = 0
Else
llLetter = llLetter + 1
txtOut= txtOut & Mid(strLine(llCount), llLetter, 1)
End If
end sub
看看这个你就知道了, 这个是按照 一个字一个字打的,你的比这个简单