Dock a form to another

  • Thread starter Thread starter Bilo
  • Start date Start date
B

Bilo

Hi,
Is there a simple way to dock a form to another? I have a media player and
want a playlist form which docks at the right site of the player form. Is
there a WindowsForm command which does the job with docking or must i build
it myself?
 
Hi Bilo,

It depends what you have in mind when you say 'dock' If you want to dock the
form as any other control (the form resides inside its parent bounderies)
you can do that in the same way you do it for any other control .The only
difference is that you have to set form's TopLevel properties to 'false'.
This property is not exposed at design time in the property browser. If you
want the paly list to stick to the palyer (but outside the player) I'm
affraid there is no support from winforms for that.
 
You could in the move events of the forms ensure that the other forms moves
with it.
You can also 'dock' the forms there when the distance is small enough
between the 2 forms.

Marcel

Stoitcho Goutsev (100) said:
Hi Bilo,

It depends what you have in mind when you say 'dock' If you want to dock the
form as any other control (the form resides inside its parent bounderies)
you can do that in the same way you do it for any other control .The only
difference is that you have to set form's TopLevel properties to 'false'.
This property is not exposed at design time in the property browser. If you
want the paly list to stick to the palyer (but outside the player) I'm
affraid there is no support from winforms for that.


--
HTH
B\rgds
Stoitcho Goutsev (100) [C# MVP]

Bilo said:
Hi,
Is there a simple way to dock a form to another? I have a media player and
want a playlist form which docks at the right site of the player form. Is
there a WindowsForm command which does the job with docking or must i build
it myself?
 
Back
Top