大家好,我刚学vb不久,有一些小问题要请大家帮忙,谢谢
问题1:怎么使一个图片在一个窗体上循环滚动。
问题2:怎么使图片加速滚动。

解决方案 »

  1.   


    Dim intStep As Integer
    Dim blnup As BooleanPrivate Sub Command1_Click()If Command1.Caption = "down" Then
        blnup = False
        Command1.Caption = "up"
    Else: blnup = True: Command1.Caption = "down"
    End If
    End SubPrivate Sub Form_Load()
    Timer1.Interval = 200
    VScroll1.Max = 200
    intStep = 100
    blnup = True
    Command1.Caption = "down"
    End SubPrivate Sub Timer1_Timer()
    With Picture1
    Select Case blnup
    Case True
    If .Top + .Height >= 0 Then
        .Move .Left, .Top - intStep
    Else
        .Move .Left, Me.ScaleHeight - .Height
    End If
    Case False
    If .Top <= Me.ScaleHeight Then
        .Move .Left, .Top + intStep
    Else
        .Move .Left, -.Height
    End If
    End Select
    End With
    End SubPrivate Sub VScroll1_Change()
    Timer1.Interval = VScroll1.Value
    End Sub你看看吧!会有用的