Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '声明按钮单击事件--由vb自动完成
Dim ca1 As Boolean, ca2 As Boolean '为了便于理解,声明了2个boolean变量
ca1 = CheckBox1.Checked '赋值
ca2 = CheckBox2.Checked '赋值
If ca1 = True And ca2 = True Then '判断是否全选
TextBox1.Text = "恭喜,全中!"
ElseIf ca1 = True And ca2 = False Then '判断第一个选、第二个未选
TextBox1.Text = "只中了第一个!"
ElseIf ca1 = False And ca2 = True Then '判断第二个选、第一个未选
TextBox1.Text = "只中了第二个!"
Else : TextBox1.Text = "您是啥也没选呀!" '其他可能(都未选)
End If
End Sub
End Class