unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Borland.Vcl.StdCtrls, System.ComponentModel;

type
  TForm1 = class(TForm)
    CheckBox1: TCheckBox;
    Label1: TLabel;
    Label2: TLabel;
  private
    { Private declarations }
  public
    { Public declarations }
  protected
    procedure WMMove(var Msg :TMessage); message WM_MOVE;
  end;

var
  Form1: TForm1;

implementation

{$R *.nfm}

procedure TForm1.WMMove(var Msg :TMessage);
begin
if (CheckBox1.Checked) then
  begin
  MessageBeep(0);
  FlashWindow(Application.Handle,True);
  Label1.Caption:='Położenie formy: x='+IntToStr(Left)+', y='+IntToStr(Top);
  Label2.Caption:='Położenie obszaru użytkownika: x='+IntToStr(LOWORD(Msg.lParam))+', y='+IntToStr(HIWORD(Msg.lParam));
  end;
end;

end.
