|
-
Dec 10th, 2006, 08:44 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Get all information about all controls
hi all
I need help to get all information about all controls in my form like their bgcolor ,location , forecolor etc
thx for future help
VS 2005 .....Framework SDK 3.0
"Its mostly the brave one who choose to not fight"
-
Dec 10th, 2006, 08:48 PM
#2
Thread Starter
Hyperactive Member
Re: Get all information about all controls
Last edited by demon.KILER; Dec 10th, 2006 at 09:10 PM.
VS 2005 .....Framework SDK 3.0
"Its mostly the brave one who choose to not fight"
-
Dec 10th, 2006, 09:01 PM
#3
Re: Get all information about all controls
I'd suggest that you check out my submission in the VB.NET CodeBank forum that walks the control tree in a form without explicit recursion. You could also use explicit recursion if you want it to be a bit more efficient, although it won't follow the tab order then, e.g.
VB Code:
Private Sub DisplayControlNames(ByVal controls As ControlCollection)
For Each cntrl In Controls
MessageBox.Show(cntrl.Name)
'Here's the recursive step to access nested controls.
Me.DisplayControlNames(cntrl.Controls)
Next cntrl
End Sub
You would call it like this:
VB Code:
Me.DisplayControlNames(Me.Controls)
-
Dec 10th, 2006, 09:08 PM
#4
Thread Starter
Hyperactive Member
Re: Get all information about all controls
VS 2005 .....Framework SDK 3.0
"Its mostly the brave one who choose to not fight"
-
Dec 11th, 2006, 04:50 AM
#5
Re: Get all information about all controls
 Originally Posted by demon.KILER
that work too thx man
Get the solution then resolved the thread by clicking the thread tool menu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|