Detect the movement of a form

uses
Windows, Forms;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
public
procedure WMMove(var Msg: TWMMove); message WM_MOVE;
end;
...
procedure TForm1.WMMove(var Msg: TWMMove);
begin
Edit1.Text := IntToStr(Left);
Edit2.Text := IntToStr(Top);
end;