how to use "For Each Loop in UserControl"

  • Thread starter Thread starter Shaurya Vardhan
  • Start date Start date
S

Shaurya Vardhan

Hi,

I am working on a User Control in VB.
As I have to navigate to all the controls present on that User Control.
How to use For Each Loop in Case of User Control ?
Or any other better option to do this?

Thanx & Regards,
Shaurya
 
Dim ThisControl As System.Windows.Forms.Control
For Each ThisControl In Me.Controls
MsgBox(ThisControl.Name)
Next ThisControl
 
Back
Top