可以向文本框发送EM_LINESCROLL 来滚动文本。wParam参数表明横向移动的字符数，而lParam是纵向移动的行数。下面是一个例子： 
    首先建立一个窗体，在其上放置两个按钮、一个文本框。将文本框的MultiLine属性设为True，ScrollBars属性设为3-Both。 
    然后输入以下代码： 
     Const EM_LINESCROLL = &HB6 
     Private Declare Function SendMessage Lib "User32" Alias _ 
     "SendMessageA" _ 
     (ByVal hWnd As Long, _ 
     ByVal wMsg As Integer, _ 
     ByVal wParam As Integer, _ 
     ByVal lParam As Long) As Long 
     
     Private Sub Form_Load() 
     Dim intLineIndex As Integer, intWordIndex As Integer 
     
     'Initialize Text1. 
     Text1.Font = "Courier New" 
     Text1.Text = "" 
     For intLineIndex = 1 To 25 'Add 25 lines of text. 
     Text1.Text = Text1.Text & "Line" & Str$(intLineIndex) 
     For intWordIndex = 1 To 5 'Make each line 12 words 
     'long. 
     Text1.Text = Text1.Text & " Word" & Str$(intWordIndex) 
     Next intWordIndex 
     Text1.Text = Text1.Text & vbCrLf 
     Next intLineIndex 
     
     Command1.Caption = "Vertical" 
     Command2.Caption = "Horizontal" 
     End Sub 
     
     Private Sub Command1_Click() 
     Dim lngRet As Long 
     
     lngRet = SendMessage(Text1.hWnd, EM_LINESCROLL, 0, 5&) 
     End Sub 
     
     Private Sub Command2_Click() 
     Dim lngRet As Long 
     
     lngRet = SendMessage(Text1.hWnd, EM_LINESCROLL, 5, 0&) 
     End Sub 
<END>
不用API函数也可以实现：每向文本框中输入一行文本，紧跟着输入：text1.selstart=len(text1.text)使光标到文本的最后一行，就可以实现自动滚屏。 
    主持人注：使用API函数可以滚动到任意一行，而这种方法只能滚到最后一行。 
<END>     
    