Timer1.Enabled = False
For i = 1 To Area
If Command_Up(i).Visible = True And Command_Up(i).Caption = "X" And
Label_Down(i).BackColor = vbRed Then
'标记雷正确
Command_Up(i).Picture = LoadPicture(App.Path + "\pictures\mine_correct.gif", , ,
Command_Up(i).Width, Command_Up(i).Height)
Command_Up(i).Visible = True
Label_Down(i).Visible = True
ElseIf Command_Up(i).Visible = True And Command_Up(i).Caption = "X" And
Label_Down(i).BackColor = vbGreen Then
'标记雷错误
Command_Up(i).Picture = LoadPicture(App.Path + "\pictures\mine_wrong.gif", , ,
Command_Up(i).Width, Command_Up(i).Height)
Command_Up(i).Visible = True
Label_Down(i).Visible = True
Else
Command_Up(i).Visible = False
Label_Down(i).Visible = True
End If
Next i
temp = MsgBox(" 恭 喜 , 扫 雷 成 功 ! " & vbCrLf & " 耗 时 : " &
Mid(Label_Time.Caption, 4) & vbCrLf & "鸣谢:平方 X O(∩_∩)O~", vbOKOnly, "成功")
End If
Continue_Flag = 0 '提示一次后结束,防止在调用 Command_Click 事件中重复提示
End If
End If
Command_Start.SetFocus
End Sub
Private Sub Command_Start_Click()
If Command_Start.Caption = "开始游戏" Then
Command_Start.Caption = "重新开始"
Continue_Flag = 1
Timer1.Enabled = True
Difficulty = Val(Text_Difficulty.Text) / 100
Area_X = Val(Text_X.Text)
Area_Y = Val(Text_Y.Text)
Area = Area_X * Area_Y
'初始化这里进行二次初始化的原因是如果在之前的运行中对字体进行了改变,将有可
能造成此处的控件大小发生变化
With Picture_show
.Left = 200
.Top = 200
评论0
最新资源