查询出的记录集要实现由下到上的滚动显示,就像网页里的一些滚动新闻那样,不知道该怎么弄,大家帮帮忙啊 谢了啊

解决方案 »

  1.   


      MovingChar.ocx这个控件可以实现你需要的功能
      

  2.   

    如果数据量不大的话,可以将查询到的数据在Label中显示。用Picture作为容器,让这个Label在Picture中移动就可以了
      

  3.   

    试了一下,代码如下:
    Private Sub Form_Load()    Dim cn As New ADODB.Connection
        Dim rs As New ADODB.Recordset    Label1.Caption = ""
        
        cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " _
            & "Data Source=" & App.Path & "\test.mdb;Persist " _
            & "Security Info=False;Jet OLEDB:Database Password=123"
            
        rs.Open "select * from tb", cn, adOpenStatic, adLockOptimistic
        
        While Not rs.EOF
            Label1.Caption = Label1.Caption & rs!f & vbCrLf    '添加字段f的信息
            rs.MoveNext
        Wend
        
        Set rs = Nothing
        Set cn = Nothing
        
        Timer1.Enabled = True
        Timer1.Interval = 100End SubPrivate Sub Timer1_Timer()    If Label1.Top + Label1.Height > 0 Then
            Label1.Enabled = True
            Label1.Move Label1.Left, Label1.Top - 30
        Else
            Label1.Enabled = False
            Label1.Move Label1.Left, Picture1.Top + Picture1.Height
        End IfEnd Sub
      

  4.   

    可以将数据放到LISTVIEW控件中,然后通过API向控件发送滚动消息,使数据滚动。具体操作方法到我的网站上查询
    http://j2soft.008.net/
    在VB资料里有!
      

  5.   

    listview, datagrid类  的控件都有滚动条的,有些控件还能实现拆分,冻结等功能