Skip to content

.Net – Loop Through ALL Controls On Form

August 29, 2012
Dim c As Control = Me
Do
   c = GetNextControl(c, True)

   If TypeOf c Is NumericUpDown Then
      AddHandler TryCast(c, NumericUpDown).ValueChanged, AddressOf txt_ValueChanged
   End If
Loop Until c Is Nothing
Advertisements

From → .Net

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: