AnnChangeUserHandle example for Delphi

Procedure TForm1.ExampleAnnChangeUserHandle ( hObject: HANNOBJECT );
var
   nCount: L_INT32;
begin
   LEADAnn1.AnnGetUserHandles (hObject);
   nCount:= LEADAnn1.AnnUserHandlesCount;

   if( nCount > 0 ) then
   begin
      LEADAnn1.AnnGetUserHandle(hObject, 0);
      LEADAnn1.AnnHandle.ContainerX:= LEADAnn1.AnnHandle.ContainerX + 10;
      LEADAnn1.AnnHandle.FillColor:= RGB(0, 0, 255);
      LEADAnn1.AnnHandle.Shape:= ANNHANDLE_SHAPE_SQUARE;
      LEADAnn1.AnnHandle.Flags:= (ANNHANDLE_FILL_COLOR +
                                  ANNHANDLE_SHAPE +
                                  ANNHANDLE_LOCATION);

      LEADAnn1.AnnChangeUserHandle(hObject, 0);
   end
   else
   begin
      ShowMessage('No User Handle');
   end;
end;