unit Unit1;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,Unit2;
type
  TForm1 = class(TForm)  private
  procedure   onmove(var  Msg: TMessage);message   wm_move;    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;
   rect1:trect;
implementation{$R *.dfm}procedure   TForm1.onmove(var Msg: TMessage);
begin
     GetWindowRect(form1.handle,rect1);     MoveWindow(form2.handle,rect1.Left+280,rect1.Top,form2.width,form2.height,true);
end;
end.