Dim s As Integer, i As Integer, total As Integer
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
s = Text2.Text
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Command3_Click()
Randomize
Text2.Text = ""
Text3.Text = ""
total = 0
For i = 0 To 15
Image1(i).Picture = Image2.Picture
Image1(i).Enabled = True
Next i
Timer1.Enabled = False
Timer2.Enabled = False
End Sub
Private Sub image1_Click(Index As Integer)
If Image1(Index).Picture = Image3.Picture Then
total = total + 1
Text3.Text = total
End If
End Sub
Private Sub Timer1_Timer()
For i = 0 To 15
Image1(i).Picture = Image2.Picture
Next i
For i = 1 To Fix(4 * Rnd()) + 1
x = Fix(Rnd * 16)
Image1(x).Picture = Image3.Picture
Next i
End Sub
Private Sub Timer2_Timer()
If s = 0 Then
For i = 0 To 15
Image1(i).Picture = Image2.Picture
Image1(i).Enabled = False
Next i
Timer1.Enabled = False
Timer2.Enabled = False
End If
Text2.Text = s
s = s - 1
End Sub
這是一個做打地鼠游戲的EXE 但是為什么運行時 點到Image (打到地鼠) text 3 .texT 卻沒有加一 ???為什么 ?
uj5u.com熱心網友回復:
圖片不能這么比較吧?If Image1(Index).Picture = Image3.Picture Then
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/125077.html
標籤:網絡編程
