UnRect2.Top = CardLocation(iCurrentCard).Top UnRect2.Bottom = CardPrevRect.Bottom UnRect2.Left = CardPrevRect.Left UnRect2.Right = CardLocation(iCurrentCard).Left ElseIf CardLocation(iCurrentCard).Left > CardPrevRect.Left And _ CardLocation(iCurrentCard).Top < CardPrevRect.Top Then ' Move right and up UnRect1.Top = CardLocation(iCurrentCard).Bottom UnRect1.Bottom = CardPrevRect.Bottom UnRect1.Left = CardPrevRect.Left UnRect1.Right = CardPrevRect.Right UnRect2.Top = CardPrevRect.Top UnRect2.Bottom = CardLocation(iCurrentCard).Bottom UnRect2.Left = CardPrevRect.Left UnRect2.Right = CardLocation(iCurrentCard).Left ElseIf CardLocation(iCurrentCard).Left < CardPrevRect.Left And _ CardLocation(iCurrentCard).Top > CardPrevRect.Top Then ' Move left and down UnRect1.Top = CardPrevRect.Top UnRect1.Bottom = CardLocation(iCurrentCard).Top UnRect1.Left = CardPrevRect.Left UnRect1.Right = CardPrevRect.Right UnRect2.Top = CardLocation(iCurrentCard).Top UnRect2.Bottom = CardPrevRect.Bottom UnRect2.Left = CardLocation(iCurrentCard).Right UnRect2.Right = CardPrevRect.Right ElseIf CardLocation(iCurrentCard).Left < CardPrevRect.Left And _ CardLocation(iCurrentCard).Top < CardPrevRect.Top Then ' Move left and up UnRect1.Top = CardLocation(iCurrentCard).Bottom UnRect1.Bottom = CardPrevRect.Bottom UnRect1.Left = CardPrevRect.Left UnRect1.Right = CardPrevRect.Right UnRect2.Top = CardPrevRect.Top UnRect2.Bottom = CardLocation(iCurrentCard).Bottom UnRect2.Left = CardLocation(iCurrentCard).Right UnRect2.Right = CardPrevRect.Right End If ' Color the uncovered rectangles with the table color FillRect Me.hdc, UnRect1, COLOR_BTNFACE + 1 FillRect Me.hdc, UnRect2, COLOR_BTNFACE + 1 ' Place current card at new location i = CardIndex(iCurrentCard) BitBlt Me.hdc, _ CardLocation(iCurrentCard).Left, _ CardLocation(iCurrentCard).Top, _ |