TMemo drag and drop
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, extctrls; type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; type TDragEdit = class(TMemo) private FLastSelStart : Integer; FLastSelLength : Integer; FDragImages: TDragImageList; procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; protected function GetDragImages: TDragImageList; override; public constructor Create(AOwner : TComponent); override; property LastSelStart : Integer read FLastSelStart write FLastSelStart; property LastSelLength : Integer read FLastSelLength write FLastSelLength; end; implementation {$R *.dfm} constructor TDragEdit.Create(AOwner: TComponent); begin inherited; ControlStyle := ControlStyle + [csDisplayD