请问谁有用 VB 编的贪食蛇游戏程序啊?给我好吗?好急啊!我邮箱是yjyscxm@163.com无限感激啊!

来源:百度知道 编辑:UC知道 时间:2024/05/14 18:10:18
请将程序写在这里,最好把做好的整个程序,压缩了,发给我 !谢谢啊!
我邮箱yjyscxm@163.com

'不用添加控件 把代码复制粘贴即可
Option Explicit

Private WithEvents Timer1 As Timer
Private WithEvents Label1 As Label
Dim GFangXiang As Boolean
Dim HWB As Single
Dim She() As ShenTi
Dim X As Long, Y As Long
Dim ZhuangTai(23, 23) As Long
Private Type ShenTi
F As Long
X As Long
Y As Long
End Type

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim C As Long
If KeyCode = 27 Then End
If KeyCode = 32 Then
If Timer1.Enabled = True Then
Timer1.Enabled = False
Label1.Visible = True
Else
Timer1.Enabled = True
Label1.Visible = False
End If
End If
C = UBound(She)
If GFangXiang = True Then Exit Sub
Select Case KeyCode
Case 37
If She(C).F = 2 Then Exit Sub
She(C).F = 0
GFangXiang = True
Case 38
If She(C).F = 3 Then Exit Sub