   ______________277

void_fastcall TFormI:: PanellMouseMove(TObject *Sender,

TShiftState Shift, int X, int Y)
{

if (! move) return;

Canvas->DrawFocusRect(rec);

rec.Left += X - XO;

rec.Right += X - XO;

rec.Top += Y - YO;

rec.Bottom += Y - YO;

XO = X;

YO = Y;

Canvas->DrawFocusRect(rec);

}

        -
     DrawFocusRect.    
    ,   
      (or)    
(.  5,  5.1.5).   ,   
rec,     DrawFocusRect   
.       .

    ,   OnMouseUp 
  :

void_fastcall TFormI::Image3MouseUp(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)
{
Canvas->DrawFocusRect(rec);

((TControl *)Sender)->SetBounds(rec.Left + X - XO,

rec.Top + Y - YO, ((TControl *)Sender)->Width,
((TControl *)Sender)->Height);

move = false;

      ,   -
     .

    ,    -
        .
        OnMouseUp   -
-     (,   Alt).  -
   ,   -  -
   :     -
      ,     -
.   ,        -
. ,   -   -
     ,        -
 .       .

        
Drag & Drop     4.5.

4.7 

       ,  -
      .   -
     ,      . -
  ,   ,      -
 .   ,   , -
 .