答案:
Option Explicit
Private Sub HScroll1_Scroll()
'**********FOUND**********
Timer1.Interval = HScroll1.Value-HScroll1.Min
End Sub
Private Sub Timer1_Timer()
'**********FOUND**********
If Label1.Left >= Form1.Width Then
'**********FOUND**********
Label1.Left = -Label1.Width
Else
Label1.Left = Label1.Left + 100
End If
End Sub
Option Explicit
Private Sub HScroll1_Scroll()
'**********FOUND**********
Timer1.Interval = HScroll1.Max - HScroll1.Value
End Sub
Private Sub Timer1_Timer()
'**********FOUND**********
If Label1.Left >= Form1.Width Then
'**********FOUND**********
Label1.Left = 0
Else
Label1.Left = Label1.Left + 100
End If
End Sub
Option Explicit
Dim speed As Integer
Private Sub Form_Load()
HScroll1.Max = 100
HScroll1.Min = 0
HScroll1.Value = 50
Timer1.Interval = 200
Timer1.Enabled = True
End Sub
Private Sub HScroll1_Change()
speed = HScroll1.Value * 5
End Sub
Private Sub Timer1_Timer()
If Label1.Left >= Form1.Width Then
Label1.Left = 0
Else
Label1.Left = Label1.Left + speed
End If
End Sub
Public Function f(ByVal m As Integer, ByVal n As Integer) As Integer
If m < n Then t = m: m = n: n = t
Do While n <> 0
t = m Mod n
m = n
n = t
Loop
f = m
End Function
private sub Command1_Click()
dim m%,n%
m=val(text1.text)
n=val(text2.text)
text3.text=f(m,n)
end sub
Timer1.Interval = HScroll1.Max - HScroll1.Value
If Label1.Left >= Form1.Width Then
Label1.Left =0