What would be a good way to convert this code?
I want to clear all of the controls on my form without calling each one independently. This is the code in VB6. The code advisor said that this was not going to work (I forgot the actual error).
VB Code:
  1. Dim ctl As Control
  2.     For Each ctl In Me.Controls
  3.         If TypeOf ctl Is TextBox Then
  4.             ctl.Text = ""
  5.         ElseIf TypeOf ctl Is OptionButton Then
  6.             ctl.Value = 0
  7.         ElseIf TypeOf ctl Is CheckBox Then
  8.             ctl.Value = 0
  9.         End If
  10.     Next
Are the form controls still called ActiveX controls?
Also, are there any references that might help with understanding the changes from VB6 to .NET?