VB如何让一个控件 重复运动?
来源:百度知道 编辑:UC知道 时间:2024/05/19 03:30:26
VB中如何 让一个控件 从左边移动到右后,
继续回到左边 向右移动?
(控件:C1)
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
c1.Left = c1.Left + 50
End Sub
如果让C1在水平线上不规则左右运动呢
继续回到左边 向右移动?
(控件:C1)
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
c1.Left = c1.Left + 50
End Sub
如果让C1在水平线上不规则左右运动呢
Private Sub Form_Load()
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
c1.Left = c1.Left + 50
if c1.left >= me.width then
c1.left = - c1.width
end if
End Sub
Private Sub Form_Load()
Timer1.Interval = 50
End Sub
Private Sub Timer1_Timer()
c1.Left = (c1.Left + 50) mod me.scalewidth
End Sub
那得看你想怎样的不规则了
这个很简单呀,控制好left值就可以了
用一个脚本:按键精灵http://www.onlinedown.net/soft/4832.htm
对啊