I want to create a control in winforms with same behavior as the container controls. I mean: in design mode, when I drop controls in it, it will group then, just like a groupbox.
This control I'm creating contains some other controls AND a GroupBox. All I need is: when a control is droped in design mode over my custom control, I'll just put it inside the nested GroupBox.
But I can't figure out how make my control respond to that kind of action in design mode.
Maybe this is what you need, I found it at CodeProject a time ago:
You need to add a Designer attribute to your control, and use a type that derives from or is the ParentControlDesigner Class (needs a reference to the System.Design.dll assembly), like this: