unit Unit1;
interface
uses
 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
 Dialogs;
type
 TForm1 = class(TForm)
 private
 { Private declarations }
 public
 { Public declarations }
 procedure OnPosChange(var Msg: TWmWindowPosChanging);
 message WM_WINDOWPOSCHANGING;
 end;
var
 Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
procedure TForm1.OnPosChange(var Msg: TWmWindowPosChanging);
begin
 Msg.WindowPos.x := Left;
 Msg.WindowPos.y := Top;
 Msg.Result := 0;
end;
end.