R
Raymon
I want to enumerate all controls on a form and list them by their
names and types.
The form has all kinds of controls.
Aside from regular controls like textboxes and buttons the form has
containers which themselves have controls inside them.
There are also menustrip and toolstrip with their own items.
I can of course traverse the form's controls collection but that only
gives the top level controls.
This obviously has to be done recursively but I am stumped how to
do it.
Can anyone help?
Thanks.
names and types.
The form has all kinds of controls.
Aside from regular controls like textboxes and buttons the form has
containers which themselves have controls inside them.
There are also menustrip and toolstrip with their own items.
I can of course traverse the form's controls collection but that only
gives the top level controls.
This obviously has to be done recursively but I am stumped how to
do it.
Can anyone help?
Thanks.