Dim a As Integer
Dim b As Integer
Private Sub Command1_Click()
Command1.SetFocus
b = Int(9 * Rnd)
For i = 0 To 8
Check1(i).Value = 0
Check1(i).Enabled = True
Next i
End Sub
Private Sub Check1_Click(index As Integer)
Command1.SetFocus
For j = 0 To 8
Select Case index
Case j
Check1(j).Enabled = False
End Select
Next j
Select Case index
Case b
MsgBox "有雷!", vbOKOnly, "警告"
MsgBox "你输了~", vbOKOnly, "失败"
For k = 0 To 8
Check1(k).Enabled = False
Next k
Case Else
Command1.SetFocus
End Select
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
For i = 0 To 8
Check1(i).Value = 0
Check1(i).Enabled = True
Next i
b = Int((8 - 0 + 1) * Rnd + 0) '产生随机数 b 以后用到的雷 在那个上
a = 1
End Sub
Private Sub Option1_Click(index As Integer)
Text1.Enabled = False
Select Case index
Case 0
a = 1
Case 1
a = 2
Case 2
a = 3
End Select
End Sub
Private Sub Option2_Click()
Text1.Enabled = True
a = Val(Text1.Text)
End Sub
Private Sub Text1_Change()
If Val(Text1.Text) > 9 Then
MsgBox "不能大于9!", vbOKOnly, "提示"
Text1.Text = ""
End If
End Sub
纯属 原创~ 练习思维用的 啊~~细细
谁能帮我改一下 哈
到底有什么错误 我就不多说了~
哪位大虾帮忙 事成之后 +66分 (⊙o⊙)…