anchor.diff:    inherited;
     FBoxedLength:=0;
     Application.OnActivate:=AppActivate;
  +  Application.OnDeactivate:=AppDeactivate;
     FFirstShow:=true;
     FDraggingTab:=-1;
     FDraggingWorkspace:=0;
  
positive.code:    end;
    //UpdateTabs;
    //CheckForms;
    Timer1.Enabled:=true;
  end;
  
  procedure TfrmBoxerMain.AppActivate(Sender: TObject);
  begin
    Timer1.Enabled:=true;
    UpdateTabs;
  end;
  
  procedure TfrmBoxerMain.AppDeactivate(Sender: TObject);
  begin
    if not(BoxHandle1.Checked) and not(BoxHandleOnce1.Checked) then
      Timer1.Enabled:=false;
  end;
  
  procedure TfrmBoxerMain.BoxHandle1Click(Sender: TObject);
  
negative.code:     FBoxed[i].l1.OnMouseDown:=TabMouseDown;
      FBoxed[i].l1.OnMouseMove:=TabMouseMove;
      FBoxed[i].l1.OnMouseUp:=TabMouseUp;
  
      SetWindowLong(FLastHWND,GWL_EXSTYLE,
        GetWindowLong(FLastHWND,GWL_EXSTYLE) or WS_EX_MDICHILD);
  
      //fits client?
      if r.Bottom<>0 then
       begin
        r1:=ScrollBox1.ClientRect;
        r2.TopLeft:=ScrollBox1.ClientToScreen(r1.TopLeft);
        //r2.BottomRight:=ScrollBox1.ClientToScreen(r1.BottomRight);
        r2.Right:=r2.Left-r1.Left+r1.Right;
        r2.Bottom:=r2.Top-r1.Top+r1.Bottom;
        if (r.Top>=r2.Top) and (r.Left>=r2.Left) and (r.Right<r2.Right) and (r.Bottom<r2.Bottom) then
         begin
          x:=r.Left+r1.Left-r2.Left;
          y:=r.Top+r1.Top-r2.Top;
         end;
       end;
  
      if not SetWindowPos(FLastHWND,HWND_TOP,x,y,0,0,SWP_ASYNCWINDOWPOS or SWP_NOSIZE) then RaiseLastOSError;
  
      ReOrderTabs(i);
     end;
    if BoxHandleOnce1.Checked then BoxHandleOnce1.Checked:=false;
    ShowWindow(frmSwitchHandle.Handle,SW_HIDE);
    UpdateTabs;
    CheckForms;
  end;
  