I need to find out in code, whether or not a control's normal behavior is to act like a container.

I could not find an API that does this.

I searched this forum for any info on this subject and I found a post that suggested using the SetParent API and if it failed, that would mean the control is not a container.

However, this doesn't quite work. It seems that even a TextBox can become a container/parent when using the SetParent API to make a control a child of the TextBox. Now as you all know, the normal behavior of a TextBox is NOT to be a container, like the PictureBox or the Frame control. So, checking an error with the SetParent API will not work for me.

Any ideas or suggestions would be appreciated.. I prefer to use some sort of API or combination of APIs to accomplish this.

Thanks,

Dan