想要让高手们帮忙看一下这个游戏的代码,本人想要此游戏运行的时候会发出声音或者有什么更有创意的。。
请高手谁帮忙看一下:
Dim X, Y, z
Dim time, hou, min, sec
Private Sub Form_Load()
time = 15
End Sub
Private Sub Image1_Click(Index As Integer)
If Image1(Index).Picture <> 0 Then
Image1(Index).Picture = Image3.Picture
z = z + 10
End If
Label1.Caption = "你的得分:" + Str(z)
If z >= 30 Then
Timer1.Enabled = False
MsgBox "恭喜你过了第一关!", , "游戏提示"
Form1.Hide
Form2.Timer1 = True
Form1.Timer1 = False
Form1.Timer2 = False
Form2.Show
End If
End Sub
Private Sub Image1_DblClick(Index As Integer)
MsgBox "不能连击!", , "游戏提示"
End Sub
Private Sub Timer1_Timer()
Randomize
If X >= 0 Then
Set Image1(X).Picture = Nothing
End If
Y = Int(9 * Rnd)
Set Image1(Y).Picture = Image2.Picture
X = Y
End Sub
Private Sub Timer2_Timer()
hou = time \ 3600
min = (time Mod 3600) \ 60
sec = (time Mod 3600) Mod 60
If Len(hou) = 1 Then hou = "0" & hou
If Len(min) = 1 Then min = "0" & min
If Len(sec) = 1 Then sec = "0" & sec
Label3.Caption = "剩余时间:" & " " & hou & ":" & min & ":" & sec
If time = 0 Then
MsgBox "时间到!"
Timer2.Enabled = False
End
Else
time = time - 1
End If
End Sub
Dim X, Y, z, x1, y1, x2, y2
Dim time, min, sec
Private Sub Form_Load()
time = 25
End Sub
Private Sub Image1_Click(Index As Integer)
If Index = x1 Or Index = x2 Then
z = z - 20
End If
If Image1(Index).Picture <> 0 Then
Image1(Index).Picture = Image3.Picture
z = z + 10
End If
Label1.Caption = "你的得分:" + Str(z)
If z >= 100 Then
Timer1.Enabled = False
MsgBox "恭喜你过了第三关,游戏结束!", , "游戏提示"
End
End If
End Sub
Private Sub Image1_DblClick(Index As Integer)
MsgBox "不能连击!", , "游戏提示"
End Sub
Private Sub Timer1_Timer()
Randomize
If X >= 0 Then
Set Image1(X).Picture = Nothing
End If
If x1 >= 0 Then
Set Image1(x1).Picture = Nothing
End If
If x2 >= 0 Then
Set Image1(x2).Picture = Nothing
End If
Y = Int(25 * Rnd)
y1 = Int(25 * Rnd)
y2 = Int(25 * Rnd)
Set Image1(Y).Picture = Image2.Picture
Set Image1(y1).Picture = Image4.Picture
Set Image1(y2).Picture = Image4.Picture
X = Y
x1 = y1
x2 = y2
End Sub
Private Sub Timer2_Timer()
hou = time \ 3600
min = (time Mod 3600) \ 60
sec = (time Mod 3600) Mod 60
If Len(hou) = 1 Then hou = "0" & hou
If Len(min) = 1 Then min = "0" & min
If Len(sec) = 1 Then sec = "0" & sec
Label2.Caption = "剩余时间:" & " " & hou & ":" & min & ":" & sec
If time = 0 Then
MsgBox "时间到!"
Timer2.Enabled = False
End
Else
time = time - 1
End If
End Sub

Dim X, Y, z
Dim time, hou, min, sec
Private Sub Form_Load()
time = 15
End Sub
Private Sub Image1_Click(Index As Integer)
If Image1(Index).Picture <> 0 Then
Image1(Index).Picture = Image3.Picture
z = z + 10
End If
Label1.Caption = "你的得分:" + Str(z)
If z >= 30 Then
Timer1.Enabled = False
MsgBox "恭喜你过了第一关!", , "游戏提示"
Form1.Hide
Form2.Timer1 = True
Form1.Timer1 = False
Form1.Timer2 = False
Form2.Show
End If
End Sub
Private Sub Image1_DblClick(Index As Integer)
MsgBox "不能连击!", , "游戏提示"
End Sub
Private Sub Timer1_Timer()
Randomize
If X >= 0 Then
Set Image1(X).Picture = Nothing
End If
Y = Int(9 * Rnd)
Set Image1(Y).Picture = Image2.Picture
X = Y
End Sub
Private Sub Timer2_Timer()
hou = time \ 3600
min = (time Mod 3600) \ 60
sec = (time Mod 3600) Mod 60
If Len(hou) = 1 Then hou = "0" & hou
If Len(min) = 1 Then min = "0" & min
If Len(sec) = 1 Then sec = "0" & sec
Label3.Caption = "剩余时间:" & " " & hou & ":" & min & ":" & sec
If time = 0 Then
MsgBox "时间到!"
Timer2.Enabled = False
End
Else
time = time - 1
End If
End Sub
Dim X, Y, z, x1, y1, x2, y2
Dim time, min, sec
Private Sub Form_Load()
time = 25
End Sub
Private Sub Image1_Click(Index As Integer)
If Index = x1 Or Index = x2 Then
z = z - 20
End If
If Image1(Index).Picture <> 0 Then
Image1(Index).Picture = Image3.Picture
z = z + 10
End If
Label1.Caption = "你的得分:" + Str(z)
If z >= 100 Then
Timer1.Enabled = False
MsgBox "恭喜你过了第三关,游戏结束!", , "游戏提示"
End
End If
End Sub
Private Sub Image1_DblClick(Index As Integer)
MsgBox "不能连击!", , "游戏提示"
End Sub
Private Sub Timer1_Timer()
Randomize
If X >= 0 Then
Set Image1(X).Picture = Nothing
End If
If x1 >= 0 Then
Set Image1(x1).Picture = Nothing
End If
If x2 >= 0 Then
Set Image1(x2).Picture = Nothing
End If
Y = Int(25 * Rnd)
y1 = Int(25 * Rnd)
y2 = Int(25 * Rnd)
Set Image1(Y).Picture = Image2.Picture
Set Image1(y1).Picture = Image4.Picture
Set Image1(y2).Picture = Image4.Picture
X = Y
x1 = y1
x2 = y2
End Sub
Private Sub Timer2_Timer()
hou = time \ 3600
min = (time Mod 3600) \ 60
sec = (time Mod 3600) Mod 60
If Len(hou) = 1 Then hou = "0" & hou
If Len(min) = 1 Then min = "0" & min
If Len(sec) = 1 Then sec = "0" & sec
Label2.Caption = "剩余时间:" & " " & hou & ":" & min & ":" & sec
If time = 0 Then
MsgBox "时间到!"
Timer2.Enabled = False
End
Else
time = time - 1
End If
End Sub