procedure TForm1.edt1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button=mbLeft then (Sender as TEdit).BeginDrag(False) ; //开始拖动 end; procedure TForm1.mmo1DragDrop(Sender, Source: TObject; X, Y: Integer); begin if (Sender is TMemo) and (Source is TEdit) then (Sender as TMemo).Lines.Add((Source as TEdit).Text) //拖到目的位置 end; procedure TForm1.mmo1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin if Source is TEdit then Accept:=True; //接收拖动 end;