Hello mehdi,
>Consider a visual component that's being derived from Control, say
MyCustomControl. This is opened-up whenever the user clicks a given
button in the toolbar. How am I supposed to open up this control
outside the ClientRectangle bounds?
Interesting way of phrasing that question... to be precise, I think you're
not supposed to do that at all.
Taking your question less literally, the reason why a simple Control
derived control will not be shown outside its parent container is because
it's not marked as being a top-level window. You could go and insert this
line in your control's constructor:
SetTopLevel(true);
Then you should be able to show the control outside any container - just
don't give it a Parent and call Show().
Of course there are certain drawbacks in this simple example - for
instance, the control will probably get a window border. It would depend
on your situation how you'd best proceed.
Oliver Sturm
--
http://www.sturmnet.org/blog