procedure TMainForm.ImageEnVect1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
var
hobj: integer;
R:TRect;
begin
hobj := ImageEnVect1.FindObjectAt(x, y, Distance);
if hobj<0 then Exit;
if (lasthobj > -1) then begin
ImageEnVect1.ObjPenColor[lasthobj] := clRed;
lasthobj := -1;
end;
if (hobj > -1) then begin
if (lasthobj > -1) then begin
ImageEnVect1.ObjPenColor[lasthobj] := clRed;
end;
ImageEnVect1.ObjPenColor[hobj] := clBlue;
lasthobj := hobj;
end;
end;