anchor.diff:      procedure DoOnFormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
       procedure DoOnFormClose(Sender: TObject; var CloseAction: TCloseAction);
       procedure DoOnFormCloseQuery(Sender: TObject; var CanClose: boolean);
  +    procedure DoOnFormWindowStateChange(Sender: TObject);
       procedure _HandleClickEvent(Sender: TObject; ADblClick: boolean);
       procedure _HandleMouseEvent(Sender: TObject;
         const AEventKind: TAppCtlMouseEvent; const AData: TAppVariant);
  
positive.code:   TFormDummy = class(TForm)
    private
      IsFormShownAlready: boolean;
      procedure DoOnFormActivate(Sender: TObject);
      procedure DoOnFormDeactivate(Sender: TObject);
      procedure DoOnFormShow(Sender: TObject);
  
negative.code: procedure TFormDummy.DoOnFormCloseQuery(Sender: TObject; var CanClose: boolean);
  begin
    CanClose:= DoEvent(-1, FEventOnCloseQuery, AppVariantNil);
  end;
  
  procedure TFormDummy.DoOnFormWindowStateChange(Sender: TObject);
  begin
    //this is for https://github.com/Alexey-T/CudaText/issues/3078
    //prevent minimizing the modal-emulated form
    if FModalEmulated then
      if WindowState=wsMinimized then
      begin
        WindowState:= wsNormal;
        Show;
      end;
  end;
  
  procedure TFormDummy.DoOnControlMenu(Sender: TObject; MousePos: TPoint;
  