Mdi Child Form - Limiting Placement Within Mdi Parent

Mdi Child Form - Limiting Placement Within Mdi Parent

Post by Bob Johnso » Tue, 20 Nov 2007 17:29:02


.NET 3.5: I have placed two controls at the top of an Mdi parent form.
The top-most control is a Panel that is docked to the Top.
Immediately below the Panel is a user control that is Anchored to the Top,
Left, and Right.

At runtme I can drag Mdi child forms toward the top of the Mdi parent. The
child forms slide beneath the user control and Panel, hiding the top portion
of the child forms beneath the Panel or user control.

Question: How can I prevent the child controls from being dragged under (or
over) the user control and Panel? I would like for the behavior to be "as if
" the child forms had run into an edge of the parent form when - while being
dragged - they get to/approaches the user control in the Mdi parent.

Thanks!
 
 
 

Mdi Child Form - Limiting Placement Within Mdi Parent

Post by Um93bGFuZC » Tue, 20 Nov 2007 21:11:01

you need to dock that control as well...

 
 
 

Mdi Child Form - Limiting Placement Within Mdi Parent

Post by Bob Johnso » Wed, 21 Nov 2007 01:12:57

>> ..NET 3.5: I have placed two controls at the top of an Mdi parent form.


RE:


I wish it were that simple. The Panel control *is* docked, and the child
forms can/do slide under it when dragged upwards. Any other ideas?

-Bob