H HABJAN ®iga Oct 20, 2003 #1 Is there a way to enumerate all controls in a form (for each c in form) - (even nested ones: in panels,...)? best re, habix
Is there a way to enumerate all controls in a form (for each c in form) - (even nested ones: in panels,...)? best re, habix
A Armin Zingler Oct 20, 2003 #2 HABJAN ®iga said: Is there a way to enumerate all controls in a form (for each c in form) - (even nested ones: in panels,...)? Click to expand... Private Sub EnumControls(ByVal Controls As Control.ControlCollection) Dim c As Control For Each c In Controls 'process c here.. '.. and recursively call the function: EnumControls(c.Controls) Next End Sub Call in the Form: EnumControls Me.Controls
HABJAN ®iga said: Is there a way to enumerate all controls in a form (for each c in form) - (even nested ones: in panels,...)? Click to expand... Private Sub EnumControls(ByVal Controls As Control.ControlCollection) Dim c As Control For Each c In Controls 'process c here.. '.. and recursively call the function: EnumControls(c.Controls) Next End Sub Call in the Form: EnumControls Me.Controls
H Herfried K. Wagner [MVP] Oct 20, 2003 #3 * "HABJAN ®iga said: Is there a way to enumerate all controls in a form (for each c in form) - (even nested ones: in panels,...)? Click to expand... <http://www.mvps.org/dotnet/dotnet/samples/controls/downloads/EnumerateControls.zip>
* "HABJAN ®iga said: Is there a way to enumerate all controls in a form (for each c in form) - (even nested ones: in panels,...)? Click to expand... <http://www.mvps.org/dotnet/dotnet/samples/controls/downloads/EnumerateControls.zip>