te Const SIMPLEREGION = 2
Private Const NULLREGION = 1

...

Dim rc As RECT
Dim rcIn As RECT
Dim bRightToLeft As Boolean
Dim hRgnOutBorder As Long
Dim hRgnInBorder As Long
Dim hRgnButton As Long
Dim lR As Long

   bRightToLeft = UserControl.RightToLeft

   GetClientRect UserControl.hWnd, rc
   
   m_hRgn = CreateRectRgn(0, 0, 0, 0)
   hRgnOutBorder = CreateRectRgn( _ 
      rc.left, rc.top, rc.right, rc.bottom)
   LSet rcIn = rc
   InflateRect rcIn, -1, -1
   hRgnInBorder = CreateRectRgn( _
       rcIn.left