返回初始位置
Dim startright As StringPrivate Sub Command1_Click()
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
startright = Text1.Left
End Sub
Private Sub HScroll1_Change()
Timer1.Interval = 10 * HScroll1.Value / 10
End Sub
Private Sub Timer1_Timer()
Text1.Left = Text1.Left + 20
If Text1.Left < 0 Then
Text1.Left = startright
End If
End Sub
问一下,这个代码为什么用“Text1.Left = Text1.Left - 20
”就能实现Text1.Left = startright,,而Text1.Left = Text1.Left + 20,就不能实现text1.left=startright
我做的是一个自己会移动的text1。在这里,先谢谢了!