VB坦克大战代码.doc

上传人:仙人指路1688 文档编号:2389326 上传时间:2023-02-17 格式:DOC 页数:5 大小:21.50KB
返回 下载 相关 举报
VB坦克大战代码.doc_第1页
第1页 / 共5页
VB坦克大战代码.doc_第2页
第2页 / 共5页
VB坦克大战代码.doc_第3页
第3页 / 共5页
VB坦克大战代码.doc_第4页
第4页 / 共5页
VB坦克大战代码.doc_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《VB坦克大战代码.doc》由会员分享,可在线阅读,更多相关《VB坦克大战代码.doc(5页珍藏版)》请在三一办公上搜索。

1、Private Sub Form_Load() La.Top = 4000 La.Left = 3000 La.Height = 800 La.Width = 900 Lb.Top = 4300 Lb.Left = 3900 Lb.Height = 200 Lb.Width = 900 Lc.Top = 4300 Lc.Left = 4560 Lc.Height = 200 Lc.Width = 200 End SubPrivate Sub Form_keypress(keyascii As Integer) If keyascii = 106 ThenLa.Enabled = FalseLb

2、.Enabled = FalseIf La.Top - Lb.Top = 900 And Lb.Left - La.Left = 300 Then Lc.Top = La.Top - 900 Lc.Left = La.Left + 300 Lc.Visible = True Timer1.Enabled = True Timer2.Enabled = False Timer3.Enabled = False Timer4.Enabled = False ElseIf La.Left - Lb.Left = 900 And Lb.Top - La.Top = 300 Then Lc.Top =

3、La.Top + 300 Lc.Left = La.Left - 900 Lc.Visible = True Timer1.Enabled = False Timer2.Enabled = True Timer3.Enabled = False Timer4.Enabled = False ElseIf Lb.Top - La.Top = 900 And Lb.Left - La.Left = 300 Then Lc.Top = La.Top + 1600 Lc.Left = La.Left + 300 Lc.Visible = True Timer1.Enabled = False Time

4、r2.Enabled = False Timer3.Enabled = True Timer4.Enabled = False ElseIf Lb.Left - La.Left = 900 And Lb.Top - La.Top = 300 Then Lc.Top = La.Top + 300 Lc.Left = La.Left + 1600 Lc.Visible = True Timer1.Enabled = False Timer2.Enabled = False Timer3.Enabled = False Timer4.Enabled = True End IfElseIf keyas

5、cii = 119 Then La.Enabled = True Lb.Enabled = True Lb.Left = La.Left + 300 Lb.Top = La.Top - 900 La.Height = 900 La.Width = 800 Lb.Width = 200 Lb.Height = 900 If Lb.Top = 0 Then Lb.Enabled = False La.Enabled = False Else La.Top = La.Top - 100 Lb.Top = Lb.Top - 100 End IfElseIf keyascii = 97 Then La.

6、Enabled = True Lb.Enabled = True Lb.Left = La.Left - 900 Lb.Top = La.Top + 300 La.Height = 800 La.Width = 900 Lb.Width = 900 Lb.Height = 200 If Lb.Left = 8700 Then Lb.Enabled = False La.Enabled = False Else La.Left = La.Left + 100 Lb.Left = Lb.Left + 100 End If ElseIf keyascii = 115 Then La.Enabled

7、= True Lb.Enabled = True Lb.Left = La.Left + 300 Lb.Top = La.Top + 900 La.Height = 900 La.Width = 800 Lb.Width = 200 Lb.Height = 900 If Lb.Top = 7600 Then Lb.Enabled = False La.Enabled = False Else La.Top = La.Top + 100 Lb.Top = Lb.Top + 100 End IfElseIf keyascii = 8 Then EndEnd IfEnd SubPrivate Sub

8、 Timer1_Timer() Do While Lc.Top 0 Lc.Top = Lc.Top - 2 Lc.Left = Lc.Left If Lc.Left Ld.Left And Lc.Left Ld.Top And Lc.Top 0 Lc.Left = Lc.Left - 2 Lc.Top = Lc.Top If Lc.Left Ld.Left And Lc.Left Ld.Top And Lc.Top Ld.Top + Ld.Height Then Ld.Visible = False Lc.Visible = False End If Loop Lc.Visible = Fal

9、se Timer2.Enabled = FalseEnd SubPrivate Sub Timer3_Timer() Do While Lc.Top Ld.Left And Lc.Left Ld.Top And Lc.Top Ld.Top + Ld.Height Then Ld.Visible = False Lc.Visible = False End If Loop Lc.Visible = False Timer3.Enabled = FalseEnd SubPrivate Sub Timer4_Timer()Do While Lc.Left Ld.Left And Lc.Left Ld.Top And Lc.Top Ld.Top + Ld.Height Then Ld.Visible = False Lc.Visible = False End If Loop Lc.Visible = False Timer4.Enabled = FalseEnd Sub

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 建筑/施工/环境 > 项目建议


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号