我编了这样一个程序代码是Private Sub Timer1_Timer()
Shape1.Left = Shape1.Left + 30
End Sub目前我不知道如何让Shape1从A点运动到B点时停止向右方向的移动,再继续按指定路径运动。Timer1的Interval值为10。请各位高手指点一下,谢谢!
Shape1.Left = Shape1.Left + 30
End Sub目前我不知道如何让Shape1从A点运动到B点时停止向右方向的移动,再继续按指定路径运动。Timer1的Interval值为10。请各位高手指点一下,谢谢!
解决方案 »
- access 类型不匹配
- 怎么这个Platform SDK网上没的下,只能买吗?
- 这个SQL语句怎写?
- VB能生成什么文件可以给其他用户执行程序?
- 请问怎样取得DLL传过来的指针所指向的数据?
- 请问高手一个问题,调用动画时,如何先添加Comct232.ocx
- 如何判断程序进入Winsock_DataArrival事件?
- 我看了好多的帖子,到底谁能给我一个做好的扑克(纸牌)游戏的源程序啊???
- 十万火急,高分酬劳。vb的要实现vfp的宏代换怎么办?百思但就是不其解?
- panch和白痴是否同音!!!!大家来投票把!(有分哦)
- 求这句英文的翻译Flexibility prorate and chargeback property and lease expenses to tenants and departments
- 如何精确显示非常大的整数?
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
End SubPrivate Sub Timer1_Timer()
If Shape1.Left + 300 + Shape1.Width < Me.Width Then
Shape1.Left = Shape1.Left + 100
Else
Timer1.Enabled = False
Timer2.Enabled = True
End If
End SubPrivate Sub Timer2_Timer()
If Shape1.Top + 500 + Shape1.Height < Me.Height Then
Shape1.Top = Shape1.Top + 100
Else
Timer2.Enabled = False
Timer3.Enabled = True
End If
End SubPrivate Sub Timer3_Timer()
If Shape1.Left > 0 Then
Shape1.Left = Shape1.Left - 100
Else
Timer3.Enabled = False
Timer4.Enabled = True
End If
End SubPrivate Sub Timer4_Timer()
If Shape1.Top > 0 Then
Shape1.Top = Shape1.Top - 100
Else
Timer4.Enabled = False
Timer1.Enabled = True
End If
End Sub
dim intX as Integer
dim intY as Integer'A点的坐标为XA,YA
'B点的坐标为XB,YB
'C点的坐标为XC,YC
'D点的坐标为XD,YD
intX=1
intY=0
private sub timer1_timer()
'区分一下什么时时候intX=1,0,-1;intY=1,0,-1
Shape1.move Shape1.left+intX*30,Shape1.Top+intY*30
end sub