anchor.diff:      F.OnKeyDown:= @Dummy.DoKeyDown;
       F.OnShow:= @Dummy.DoOnShow;
   
  +    //scale for high-DPI
  +    DoScaleForHighDpi(F);
  +
       Res:= F.ShowModal;
       if Res>=cButtonResultStart then
       begin
  
positive.code: 
  function IsDialogCustomShown: boolean;
  function DoDialogCustomGetControlHeight(const Id: string): integer;
  
  implementation
  
  
negative.code:   end;
  end;
  
  procedure DoScaleForHighDpi(F: TForm);
  begin
    if Screen.PixelsPerInch<>F.DesignTimeDPI then
      F.AutoAdjustLayout(lapAutoAdjustForDPI,
        F.DesignTimeDPI, Screen.PixelsPerInch,
        F.Width, ScaleX(F.Width, F.DesignTimeDPI));
  end;
  
  { TDummyClass }
  
  procedure TDummyClass.DoOnShow(Sender: TObject);
  