dbIM:TDBImage; begin
nmComp:='';ctr:=nil;dbIm:=nil;
DragQueryFile(THandle(Msg.WParam),0,drFile,SizeOf(drFile));
DragQueryPoint(THandle(Msg.WParam),XYPoint);
DragFinish(THandle(Msg.WParam));
for j := 0 to ComponentCount-1 do begin
if (Components[j] is TDBImage) then begin
ctr:= Components[j] as TControl;
R.Left :=ctr.Left+paLeft.Left;R.Top :=ctr.Top+paLeft.Top;
R.Right := R.Left+ctr.ClientWidth;R.Bottom :=R.Top+ctr.ClientHeight;
With R do
if (XYPoint.x >Left) and(XYPoint.x (XYPoint.y >Top) and(XYPoint.y nmComp:= ctr.Name;Break;
end;
end;
end;