HI!

My first post, so Hello there!
I=B4m trying to develop an apllication with docked forms, like in
Winamp. If a child forms is docked to the parent form it should move
and resize like the parent form does.

I=B4ll give you an simple example of how I tried to archive this:

Form parent =3D new Form();
parent.TopMost =3D true;
Form child =3D new Fom();

parent.Move +=3D new EventHandler(parent_move);

void parent_move(object sender, EventArgs e)
{
child.Bounds =3D parent .Bounds;
}


This example is not very usefull, because the parent form will
completly cover the child, but it shows my problem: The child form
moves slowlyer. Moving the parent form will cause the child form to
move, but with a delay of time. I want them to move as if they where
ONE form!!!

I was seraching for days now, tried serveral Win32 Api calls regarding
moving but I didn=B4t get it!

Can anyone help me?

Re: Move two Forms simultaneously by Michael

Michael
Sun Nov 26 18:07:16 CST 2006

"gourmete" <bristian@t-online.de> wrote in message
news:1164536254.328027.277440@f16g2000cwb.googlegroups.com...
> I was seraching for days now, tried serveral Win32 Api calls regarding
> moving but I didn´t get it!
>
> Can anyone help me?

This seems to work ok

private const int WM_MOVE = 0x3;
protected override void WndProc(ref Message m)
{
base.WndProc (ref m);
if(m.Msg == WM_MOVE)
{
otherForm.Location = new Point(this.Right, this.Top);
}
}