unit ReceiverMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TfMain = class(TForm)
    GroupBox1: TGroupBox;
    mm: TMemo;
  private
    { Private declarations }
    procedure WMCopyData(var Msg: TWMCopyData); message WM_COPYDATA;
  public
    { Public declarations }
  end;

  TExchange = record
    DT : TDateTime;
    Name : string[100];
    Square : real;
  end;

var
  fMain: TfMain;

implementation

{$R *.dfm}

procedure TfMain.WMCopyData(var Msg: TWMCopyData);
var sText: PChar;
    Ex : TExchange;
begin
  Ex := TExchange(Pointer(Msg.CopyDataStruct.lpData)^);

  mm.Lines.Add('Дані відправлено: ' + DateTimeToStr(Ex.DT));
  mm.Lines.Add('Прізвище: ' + Ex.Name);
  mm.Lines.Add('Площа ділянки: ' + FormatFloat('0.000', Ex.Square));
  mm.Lines.Add('-------------------------');
end;

end.
