想起我最开始上学习的 VB 课,最后的大作业一个游戏就是这样的风格
```vb
If keyascii = 119 Then
Image1.Top =
Image1.Top - 200
End If
If keyascii = 115 Then
Image1.Top =
Image1.Top + 200
End If
If keyascii = 97 Then
Image1.Left = Image1.Left - 200
End If
If keyascii = 100 Then
Image1.Left = Image1.Left + 200
End If
If keyascii = 32 Then
If Image3(4).Visible = False Then
Call m3
Else
Call m1
WindowsMediaPlayer1.Enabled = False
Image3(i).Visible = False
i = i + 1
If i = 5 Then i = 0
If Abs((Image1.Left + Image1.Width / 2) - (Image2.Left + Image2.Width / 2)) <= Image2.Width / 3 And Abs((
Image1.Top + Image1.Height / 2) - (
Image2.Top + Image2.Height / 2)) <= (9 / 10) * Image2.Height Then
If Image2.Picture = Image4.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image2.Picture = Image4.Picture
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image11.Left + Image11.Width / 2)) <= Image11.Width / 3 And Abs((
Image1.Top + Image1.Height / 2) - (
Image11.Top + Image11.Height / 2)) <= (9 / 10) * Image11.Height Then
If Image11.Picture = Image12.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image11.Picture = Image12.Picture
Timer1.Enabled = False
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image7.Left + Image7.Width / 2)) <= Image7.Width / 3 And Abs((
Image1.Top + Image1.Height / 2) - (
Image7.Top + Image7.Height / 2)) <= (9 / 10) * Image7.Height Then
If Image7.Picture = Image13.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image7.Picture = Image13.Picture
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image8.Left + Image8.Width / 2)) <= Image8.Width / 3 And Abs((
Image1.Top + Image1.Height / 2) - (
Image8.Top + Image8.Height / 2)) <= (9 / 10) * Image8.Height Then
If Image8.Picture = Image14.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image8.Picture = Image14.Picture
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image9.Left + Image9.Width / 2)) <= Image9.Width / 3 And Abs((
Image1.Top + Image1.Height / 2) - (
Image9.Top + Image9.Height / 2)) <= (9 / 10) * Image9.Height Then
If Image9.Picture = Image15.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image9.Picture = Image15.Picture
Image9.Move 15000
Timer2.Enabled = True
End If
```