求助各位大侠:为什么command2中的if语句执行不了?我是个新手,高手教教我,谢谢各位!!!
Dim n, a, b, c, d, e, l(1 To 3, 1 To 3) As Integer
Private Sub Command2_Click()
If Picture2(1).Picture = Picture2(2).Picture Then
Print "1"
End If
End Sub
Private Sub Form_load()
Randomize
n = Int(Rnd * 2) + 0
End Sub
Private Sub Command1_Click(Index As Integer)
a = Index
Command1(a).Visible = False
d = a
For b = 1 To 3
For c = 1 To 3
l(b, c) = n
If l(b, c) = 1 Then
Picture2(d).Picture = LoadPicture("yuan.gif"): e = 0
End If
If l(b, c) = 0 Then
Picture2(d).Picture = LoadPicture("cha.gif"): e = 1
End If
n = e
b = Int(Rnd * 3 + 1)
Next c
Exit For
Next b
End Sub