unit Unit1;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Rtti, System.Classes,
  System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Layouts,
  FMX.Memo;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    Label1: TLabel;
    procedure Memo1DragDrop(Sender: TObject; const Data: TDragObject;
      const Point: TPointF);
    procedure Memo1DragOver(Sender: TObject; const Data: TDragObject;
      const Point: TPointF; var Accept: Boolean);
  private
    { private 宣言 }
  public
    { public 宣言 }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Memo1DragDrop(Sender: TObject; const Data: TDragObject;
  const Point: TPointF);
begin
  { 1つ目のファイルを読み込んで表示 }
  Memo1.Lines.LoadFromFile(Data.Files[0], TEncoding.UTF8);
end;

procedure TForm1.Memo1DragOver(Sender: TObject; const Data: TDragObject;
  const Point: TPointF; var Accept: Boolean);
begin
  Accept := True;
end;

end.
