   ______________265

void   fastcall TFormI::ListBoxlDragOver(TObject *Sender,

TObject *Source, int X, int Y, TDragState State, bool SAccept)
(

if(Sender != Source)
Accept = Source->ClassNameIs("TListBox") ;

else Accept = (false);

}

   ,      (Sender)  -
  (Source)     .  ,  -
        .  
       ,   else  
Accept   false,   .    -
 ,  Accept   true,    -
  (  TListBox),   false,   -
    .    ListBoxl ,
       .

  Accept,     OnDragOver,
  ,      -
.        OnDragOver,  ,
        .

       
  OnDragDrop  .   -
,         
.       Source (-
-)    Y  .     -
       ,   -
 OnDragDrop   :

void _fastcall TFormI::ListBoxlDragDrop(TObject *Sender,

TObject *Source, int X, int Y)
{

TListBox *S = (TListBox *)Source;

((TListBox*)Sender)->Items->Add(S->Items->Strings[S->ltemlndex]) ;

)

       S   
TListBox,        Source,   
TListBox.     ,       -
    Source      TListBox. 
      .  Source -
      TObject.      -
 Items  Itemlndex.      TListBox.  ,
    ,    
 Source.      1.6.6.2  1.

     Add   -
- S  - Sender.      
        Drag&Drop.

          
S.        :

void _fastcall TFormI::ListBoxIDragDrop(TObject *Sender,

TObject *Source, int X, int Y)
(
((TListBox*)Sender)->Items->Add(((TListBox *)Source)->

Items->Strings[((TListBox *)Source)->ltemlndex]);

)

      
OnEndDrag,      - -