Dim i As Integer For Each c As WinForm.Control In e.Form.Controls If TypeOf c Is WinForm.CheckBox Then Dim ctl As WinForm.CheckBox = c If ctl.Checked Then i + = 1 End If End If Next If i > 0 Then MessageBox.Show("有的复选框已选中") Else MessageBox.Show("所有复选框都未选中") End If