有一个笨办法:
把标签放在frame中,再加个timer,然后来控制标签的位置就行了(左右移)

解决方案 »

  1.   

    呵呵,timer控制lable.caption也可以lable.caption="123"
    下次
    lable.caption="231"
    下次
    lable.caption="312"
      

  2.   

    timer控制lable的位置:
    将timer的interval 设为1000
    在timer事件中加入:
      label1.left=label1.left-100  '数字可任意给
    最好加一个frame,并将label标签加入frame中
      if label1.left+label1.width<frame.left then
         label1.left=frame.left+frame.width
      end if
      

  3.   

    给你一段我使用的例子
    Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
    Private Declare Function GetTickCount Lib "kernel32" () As Long
    Const DT_BOTTOM As Long = &H8
    Const DT_CALCRECT As Long = &H400
    Const DT_CENTER As Long = &H1
    Const DT_EXPANDTABS As Long = &H40
    Const DT_EXTERNALLEADING As Long = &H200
    Const DT_LEFT As Long = &H0
    Const DT_NOCLIP As Long = &H100
    Const DT_NOPREFIX As Long = &H800
    Const DT_RIGHT As Long = &H2
    Const DT_SINGLELINE As Long = &H20
    Const DT_TABSTOP As Long = &H80
    Const DT_TOP As Long = &H0
    Const DT_VCENTER As Long = &H4
    Const DT_WORDBREAK As Long = &H10Private Type RECT
            Left As Long
            Top As Long
            Right As Long
            Bottom As Long
    End Type'要移动的字
    Const ScrollText As String = "1234567890" & vbCrLf & vbCrLf & _
                                 "abcdefghij" & vbCrLf & vbCrLf & _
                                 "ABCDEFGHIJ" 
                                 
    Dim EndingFlag As Boolean
    --------------------------------------------------------
    Private Sub Form_Activate()
     RunMain
    End Sub
    --------------------------------------------------------
    Private Sub RunMain()
    Dim LastFrameTime As Long
    Const IntervalTime As Long = 40
    Dim rt As Long
    Dim DrawingRect As RECT
    Dim UpperX As Long, UpperY As Long 'Upper left point of drawing rect
    Dim RectHeight As Long
    Me.Refreshconstant
    rt = DrawText(picScroll.hDC, ScrollText, -1, DrawingRect, DT_CALCRECT)If rt = 0 Then 'err
        MsgBox "Error scrolling text", vbExclamation
        EndingFlag = True
    Else
        DrawingRect.Top = picScroll.ScaleHeight
        DrawingRect.Left = 0
        DrawingRect.Right = picScroll.ScaleWidth
        'Store the height of The rect
        RectHeight = DrawingRect.Bottom
        DrawingRect.Bottom = DrawingRect.Bottom + picScroll.ScaleHeight
    End If
    Do While Not EndingFlag
        
        If GetTickCount() - LastFrameTime > IntervalTime Then
                        
            picScroll.Cls
            
            DrawText picScroll.hDC, ScrollText, -1, DrawingRect, DT_CENTER Or DT_WORDBREAK
            
            'update the coordinates of the rectangle
            DrawingRect.Top = DrawingRect.Top - 1
            DrawingRect.Bottom = DrawingRect.Bottom - 1
            
            'control the scolling and reset if it goes out of bounds
            If DrawingRect.Top < -(RectHeight) Then 'time to reset
                DrawingRect.Top = picScroll.ScaleHeight
                DrawingRect.Bottom = RectHeight + picScroll.ScaleHeight
            End If
            
            picScroll.Refresh
            
            LastFrameTime = GetTickCount()
            
        End If
        
        DoEvents
    LoopUnload MeEnd Sub
      

  4.   

    vbhelp(VB助手):有这样的控件吗,能发一个给我吗?[email protected]谢谢
      

  5.   

    做一个带滚动字幕的网页,然后用webbrowser控件观看。基本不用编写代码。