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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top