All Controls in Form
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
How to get all the controls in the form, like in VB we used to do for each ctrl in me if typeof ctrl is Textbox then ctrl.text = "" end if next How we do this in VB.Net.??? Thanks :)Be Humble in Victory and Strong in Defeat.:) -Het
You need to use the Controls property, which all forms have, and it seems all controls have. So your panels can have a collection of controls. You can do this dim lControl as Control for each lControl in Me.Controls ... Next Me is a form or Panel or any control. The typeof works the same. Hope this helps. Nursey