我正在尝试为表单上的每个复选框设置一个注册表项,但在以下代码块中,我收到了错误'Checked' is not a member of 'System.Windows.Forms.Control'
有人可以帮我找出我收到此错误的原因吗?
' Create the data for the 'Servers' subkey
Dim SingleControl As Control ' Dummy to hold a form control
For Each SingleControl In Me.Controls
If TypeOf SingleControl Is CheckBox Then
Servers.SetValue(SingleControl.Name, SingleControl.Checked) ' Error happening here
End If
Next SingleControl