473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Q: enum controls

Is there a way to enumerate all controls in a form (for each c in form) -
(even nested ones: in panels,...)?

best re,
habix
Nov 20 '05 #1
3 1610
"HABJAN ®iga" <habix[AT]intelcom[DOT]si> schrieb
Is there a way to enumerate all controls in a form (for each c in
form) - (even nested ones: in panels,...)?

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
--
Armin

Nov 20 '05 #2
* "HABJAN ®iga" <habix[AT]intelcom[DOT]si> scripsit:
Is there a way to enumerate all controls in a form (for each c in form) -
(even nested ones: in panels,...)?


<http://www.mvps.org/dotnet/dotnet/samples/controls/downloads/EnumerateControls.zip>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Thanks to both of you

re,
habix

"HABJAN ®iga" <habix[AT]intelcom[DOT]si> wrote in message
news:bn*********@enews3.newsguy.com...
Is there a way to enumerate all controls in a form (for each c in form) -
(even nested ones: in panels,...)?

best re,
habix

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Waqas Pitafi | last post by:
Hi, I have a table with the data like this, ID Status Description 1 R Read 2 U UnRead D D ...
4
by: slot | last post by:
Is it possible to compare "enum" types to basic types like "unsigned short" type at all? Thanks!
1
by: Greg Smith | last post by:
Is there a way to have an enum of controls? What I want to do is have the user click on a button and then perform a procedure on that button and a certain number of buttons after that. Any help...
5
by: steve bull | last post by:
I am sure this is a really basic question but I don't see an easy way to do it. I have an enum public enum ColorType { red = 0, green = 1, blue = 2, hue = 3,
4
by: Brent Ritchie | last post by:
Hello all, I have been wondering is it possible to get the datatype of an enumeration without using reflection. To clearify if I do: enum Genders { Male, Female }
18
by: **Developer** | last post by:
If e.Button = MouseButtons.Left Then also from a Dim Answer As DialogResult = MessageBox.Show.. Select Case Answer Case DialogResult.Yes
7
by: Harris | last post by:
Dear all, I have the following codes: ====== public enum Enum_Value { Value0 = 0, Value1 = 10,
5
by: Paul | last post by:
VB.NET - VS 2005 Is it possible to create an Enum with numeric members. Example: Public Enum NumberOfDecimalPlaces Auto 1 2 3 4
5
by: Bill Gower | last post by:
I have a group of 7 checkboxes representing the days of the week. I have an enum that that corresponds to the days ex. DaysOfWeek.Sunday, DaysOfWeek.Monday etc. I have a library that has a...
4
by: Gugale at Lincoln | last post by:
Hi, I am using reflection to read names from enum and creating radio buttons inside a groupbox. Everything is working fine. However, I am not able to adjust the size of the group box to fit the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.