This code displays a message in a label named Status. The message displayed depends on whether the dragged label control was successfully dropped into and accepted by another control.
procedure TForm1.Label1EndDrag(Sender, Target: TObject; X, Y: Integer); var S: string; begin S := (Sender as TLabel).Name + ' was dropped... and '; if Target <> nil then S := S + 'accepted!' else S := S + 'rejected!'; Status.Caption := S; end;