title: Moving images while drag and drop
body: <p>I have an TImage on a TPanel, and an other (empty) TPanels. I want to drag
  the image from the first to the second panel using the drag and drop.</p>
  
  <p>I actually want to see the image while it's moving from one panel to the
  other (semi-transparent).</p>
  
  <p>I think I should use <code>TDragObject.GetDragImages</code> but I can't figure out how to construct the whole magic.</p>
  
  <pre><code>procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
    Shift: TShiftState; X, Y: Integer);
  begin
    Image1.ControlStyle := Image1.ControlStyle + [csDisplayDragImage]; // ???
    TImage(Sender).BeginDrag(False);
  end;
  
  procedure TForm1.Image1StartDrag(Sender: TObject; var DragObject: TDragObject);
  begin
    // ???
  end;
  
  procedure TForm1.Panel1DragOver(Sender, Source: TObject; X, Y: Integer;
    State: TDragState; var Accept: Boolean);
  begin
    if (Source is TImage) then
      Accept := TImage(Source).Parent &lt;&gt; Sender;
  end;
  
  procedure TForm1.Panel1DragDrop(Sender, Source: TObject; X, Y: Integer);
  begin
    if (Source is TImage) then
    begin
      TImage(Source).Parent := TPanel(Sender);
      TImage(Source).Align := alClient;
    end;
  end;
  </code></pre>
  
  <hr>
  
  <p>Update - I found a useful article: <a href="http://www.blong.com/Conferences/BorCon2001/DragAndDrop/4114.htm">Implementing Professional Drag &amp; Drop In VCL/CLX Applications</a></p>