Control extending beyond border of parent control
Is there any way to create a control that will allow its children controls to extend beyond its border? I thought about using ToolStripDropDown but i want the children to move with the pa开发者_运维百科rent. I want it to look
like thatWindows Forms doesn't support this. Controls must be child windows, they have their TopLevel property set to False. Which confines them to their container. There's only one Control-derived class that has TopLevel = true, the Form class. ToolTip and ContextMenuStrip are top level windows too, but they are components.
The reason it has this restriction is that top level windows behave poorly in the designer. You can however create them in code. Check out my answer in this thread to see how to do that.
精彩评论