I'm developing a usercontrol. That usercontrol would like to discover every public property of any control contained on the parent form. Of course the usercontrol needs to do this dynamically, with no knowledge of what types of controls may exist in the parent. This enumeration of properties is to test for specific ones that can contain a specific property object type. These property names are not the same on every control and that doesn't include adding custom usercontrols into the mix.

I've gotten this done for any control that exists on the parent/top-level object, i.e., the form. Task completed via the use of IDispatch and ITypeInfo interfaces. The beauty of this is that the usercontrol can query this information without the form running. And this leads me to my question...

Can anyone think of a way to enumerate property names (not really interested in method names) of the parent/top-level object that a usercontrol sits on, while that parent/top-level object is not running, i.e., you are modifying its design. I do not want to hardcode any property names, want them dynamically discovered. If this doesn't seem doable, I'll revert to less preferred means of getting the property names.

P.S. The reason I can't do this via ITypeInfo, at the form level, is that unless the form is running, the form's ITypeInfo does not implement all methods, including the one I use to discover its controls' property names even when the form is not running.

Note: This solution does not need to work when the project is compiled and ITypeInfo will likely fail 100% of the time.