By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,579 Members | 1,618 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,579 IT Pros & Developers. It's quick & easy.

create control array in vb.net

P: n/a
Tom
Dear All :

How to create control array class in vb.net
and how to use loop method so that add all button of cuurent form into
collection class

Thanks
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Tom" <pc***@tomgroup.com> schrieb:
How to create control array class in vb.net


Accessing controls by their names or indices
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=controlbynameindex&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2

P: n/a
Tom,

All child controls are in the collection from its parent. Therefore often
there is no need to create that array.

When you want by instance all buttons that are directly on your form than
you can do

\\\\
for each ctr as control in me.controls
if Typeof ctr Is Button then
'do something
end it
Next
///

I hope this helps,

Cor
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.