title: How to check if a checkbox is checked when iterating through form controls
body: <p>I'm trying to set a registry key for every checkbox on a form, but in the following block of code, I'm receiving the error <code>'Checked' is not a member of 'System.Windows.Forms.Control'</code></p>
  
  <p>Can somebody please help me find out why I'm getting this error?</p>
  
  <pre><code>' 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
  </code></pre>