GetControls() ignoring TabControl and ScrollBar?


Active Member
Licensed User
I've got a generic form which I want to use by creating controls dynamically and placing them on the form. When the form closes, I call GetControls( "formGeneric" ), get the list, and start disposing of controls.

There are three controls on this form: one Label, one TabControl, and one ScrollBar. The label disposes without a problem, but in the list of controls where the names of the TabControl and the ScrollBar should be, it's just blank. A zero-length string.

Am I missing something here?



(I should have mentioned that I am using ControlsEX.DLL version 1.0.2995.34468.)
Last edited:


Active Member
Licensed User

Attached is a minimal example of the problem.


Licensed User
For clarification.

GetControls("") returns all the controls that B4PPC knows about from its' own central collection of controls.

GetControls("someform") returns the controls from "someform"s' control collection. As only B4PPC native controls (and not all of them) have their name stored within themselves "someforms"s' control collection doesn't know the name of other types of control and so can only return a blank string.

Your best bet is probably to keep a record of controls, and maybe their type, added to each form in a collection of some sort which you can update as you add and dispose external controls.