If e.Sender.Name In ('出库记录','出库明细','库存表','入库记录','入库明细','货品信息')
Dim lst As new List(Of String)
Dim gb As WinForm.GroupBox = e.Form.Controls("GroupBox2")
Dim cb As WinForm.Control
For Each cb In e.Form.Controls
If Typeof cb Is winform.checkbox Then
Dim c As WinForm.CheckBox = cb
If c.Checked = 1 Then
lst.add(c.Text)
End If
End If
Next
If lst.count > 0 Then
e.Form.Controls("初始化以下表").Enabled = True
Else
e.Form.Controls("初始化以下表").Enabled = False
End If
End If
上面的代码红字部分会报错,因为汉字部分全部被注释掉了。
但是In运算符用去类确实方便,有没有什么办法呢?