  
   Dim tR As RECT
   GetClientRect m_oContainer.hWnd, tR
   
   If (m_eOrientation = cSPLTOrientationVertical) Then
      ' Check right too big:
      If (m_lMaxSize(2) &gt; 0) Then
         If ((tR.Right - m_lSplitPos - m_lSplitSize) &gt; m_lMaxSize(2)) Then
            m_lSplitPos = tR.Right - m_lMaxSize(2) - m_lSplitSize
         End If
      End If
      ' Check left too big:
      If (m_lMaxSize(1) &gt; 0) Then
         If (m_lSplitPos &gt; m_lMaxSize(1)) Then
            m_lSplitPos = m_lMaxSize(1)