If condition on W_MouseMove not needed.

The lines:
  If BDown And (NewOutsideValue <> OutSide) Then
    OutSide = NewOutsideValue
  Else
    OutSide = NewOutsideValue
  End If

are not needed, because in either case the variable OutSide is set equal to NewOutsideValue.