火速求援!请VB高手帮我做这个程序改错题,每个FOUND下一行都有错误。请改成正确的。急求啊!!!

2025-01-08 03:29:01
推荐回答(5个)
回答1:

答案:
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

回答2:

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

回答3:

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

回答4:

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

回答5:

Timer1.Interval = HScroll1.Max - HScroll1.Value
If Label1.Left >= Form1.Width Then
Label1.Left =0