新手写的第一个程序 遇到的问题 怎么让它不显示Image1
Private Sub Command1_Click(Index As Integer)Image1.Visible = False
Image2.Visible = False '隐藏图片
Label1(0).Caption = Int(Rnd * 10)
Label2(1).Caption = Int(Rnd * 10)
Label3(2).Caption = Int(Rnd * 10)
Label5.Caption = Int(Rnd * 10)
Label6.Caption = Int(Rnd * 10) '得到随机数
'当数字出现1个7时显示图片1
If (Label1(0).Caption = 7) Or (Label2(1).Caption = 7) Or _
(Label3(2).Caption = 7) Or (Label5.Caption = 7) Or (Label6.Caption = 7) _
Then Image1.Visible = True
'当数字出现2个7时显示图片2
If (Label1(0).Caption = 7) And (Label2(1).Caption = 7) Or _
(Label1(0).Caption = 7) And (Label3(2).Caption = 7) Or _
(Label1(0).Caption = 7) And (Label5.Caption = 7) Or _
(Label1(0).Caption = 7) And (Label6.Caption = 7) Or _
(Label2(1).Caption = 7) And (Label3(2).Caption = 7) Or _
(Label2(1).Caption = 7) And (Label5.Caption = 7) Or _
(Label2(1).Caption = 7) And (Label6.Caption = 7) Or _
(Label3(2).Caption = 7) And (Label5.Caption = 7) Or _
(Label3(2).Caption = 7) And (Label6.Caption = 7) Or _
(Label5.Caption = 7) And (Label6.Caption = 7) _
Then Image2.Visible = True
我现在的问题是 当我单击控件1出现 一个7 显示第一个图(正常) 当出现两个7 第一个图和第二个图都显示出来 请教怎么让它出现两个7时候 只显示第二个图 不显示第一个图~~~~~~