Option ExplicitPrivate Declare Function SendMessage Lib "user32" Alias "SendMessageW" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    
Const EM_LINESCROLL = &HB6
Private Sub Command1_Click()
Timer1.Interval = 1000End SubPrivate Sub Form_Load()
Dim i As Integer
    For i = 0 To 100
        RichTextBox1.Text = RichTextBox1.Text & "Line" & i & vbCrLf
    Next
End SubPrivate Sub Timer1_Timer()
SendMessage RichTextBox1.hwnd, EM_LINESCROLL, 5, ByVal 1   '将Text1中的文本向下滚动1行
End Sub