anchor.diff:    end;
   end;
   
  +
  +procedure DoForm_Scale(F: TForm);
  +begin
  +  //dont scale if Screen dpi is smaller (macOS: 72)
  +  if Screen.PixelsPerInch>F.DesignTimeDPI then
  +    F.AutoAdjustLayout(lapAutoAdjustForDPI,
  +      F.DesignTimeDPI, Screen.PixelsPerInch,
  +      F.Width, ScaleX(F.Width, F.DesignTimeDPI)
  +      , false //AScaleFonts, Laz 1.7 trunk
  +      );
  +end;
  +
  +
  +function DoForm_GetResult(AForm: TForm): string;
  +var
  +  List: TStringList;
  +  NActive, i: integer;
  +  C: TControl;
  +begin
  +  Result:= '';
  +
  +  List:= TStringList.Create;
  +  try
  +    List.TextLineBreakStyle:= tlbsLF;
  +
  +    NActive:= -1;
  +    for i:= 0 to AForm.ControlCount-1 do
  +    begin
  +      C:= AForm.Controls[i];
  +      if C=AForm.ActiveControl then NActive:= i;
  +      List.Add(DoControl_GetState(C));
  +    end;
  +
  +    //append NActive
  +    List.Add('focused='+IntToStr(NActive));
  +
  +    Result:= List.Text;
  +  finally
  +    FreeAndNil(List);
  +  end;
  +end;
   
   procedure DoForm_AddControl(AForm: TForm; ATextItems: string; ADummy: TDummyClass);
   var
  
positive.code:       Ctl.Left:= NX1;
        Ctl.Width:= NX2-NX1;
        Ctl.Top:= NY1;
        if not DoControl_IsAutosizeY(Ctl) then
          Ctl.Height:= NY2-NY1;
        Continue;
      end;
  
negative.code:   Result:= S<>'0';
  end;
  
  function DoControl_IsAutoHeight(C: TControl): boolean;
  begin
    Result:=
      (C is TLabel) or
  