vb 题 帮忙做一下。。。 谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/18 04:11:19
vb题 希望大家帮忙0 0
选做一道 1-4题 选一个回答 根据难易程度 我会追加更多的分(前提是我看懂了。。。我是新手)

做一个小球(SHAPE) 放在4条线组成的正方形里头
然后运动 有准备 开始 停止 3个按钮

1题 小球上下往返运动 碰到线反方向运动
2题 向右下 45°运动 碰线 向左上运动 反复
3题 四周反弹运动
4题 鼠标移动挡板 实现挡球效果

谢谢大家了!!

暂时只做了3题,最后一题正在做 

我先把代码发出来: 

总共4个按钮

command1,command2,command3,command4

3个Timer

timer1,timer2,timer3

1个圆形shape1

4个Line

LineUp,LineDown,LineLeft,LineRight

=============================================

以下是代码部分:

=============================================

Dim Direction As String 

Private Sub Command1_Click() 

Direction = "下" 

Timer2.Enabled = False 

Timer1.Enabled = True 

End Sub 

Private Sub Command2_Click() 

Direction = "右下" 

Timer2.Enabled = False 

Timer1.Enabled = True 

End Sub 

Private Sub Command3_Click() 

Direction = "右下" 

Timer1.Enabled = False 

Timer2.Enabled = True&nbs