Saludos colegas, vera, quiero realizar una función donde pueda hacer la limpieza de todos los controles texbox y combobox de mi form, hasta ahora tengo esto...
Código VB.NET:
Ver originalFor Each t As ComponentFactory.Krypton.Toolkit.KryptonTextBox In Controls
If TypeOf t Is ComponentFactory.Krypton.Toolkit.KryptonTextBox Then
t.Text = ""
End If
Next
For Each c As ComponentFactory.Krypton.Toolkit.KryptonComboBox In Controls
If TypeOf c Is ComponentFactory.Krypton.Toolkit.KryptonComboBox Then
c.SelectedIndex = -1
End If
Next
Pero me truena el programa al llamar a las funciones, me sale el siguiente error:
Unable to cast object of type 'ComponentFactory.Krypton.Toolkit.KryptonPanel' to type 'ComponentFactory.Krypton.Toolkit.KryptonTextBox'.
Sugerencias? :(