276______________________________________________ 4

void _fastcall TFormI:: PanellMouseMove(TObject *Sender,

TShiftState Shift, int X, int Y)
(
if (move)

Panell->SetBounds(Panell->Left + X - XO,

Panell->Top + Y - YO, Panell->Width, Panell->Height);

}

     SetBounds    
     (X  XO     Y  YO  -
 Y).        
  , ..     . -
       
 Left   :

Panell->Left += X - XO;

Panell->Top += Y - YO;

     ,    -
    :   ,    .
       .

  ,     , -
  OnMouseUp.       
:

move = false;

    .    -
 OnMouseMove  ,  ,     j
 .

      .  -
     ,   -
   ,   ,   -
      .

    ,     -
 ,   .      
  ,      
     ,     .
       ,   -
   5.   ,   ,   OnMou-
seDown,    :

void _fastcall TFormI:: PanellMouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)
(

if (Button '.= mbLeft) return;

XO = X;

YO = Y;

Panell->BringToFront();

rec = Panell->BoundsRect;

move = true;

}

       
rec = Panell->BoundsRect;

    rec (    
)   .

       -
 OnMouseMove,  :

i