Version

CalculateRestrictToRect Method

Calculates the rect where a drop down will be restricted to.
Syntax
'Declaration
 
Public Shared Function CalculateRestrictToRect( _
   ByVal exclusionArea As Rectangle, _
   ByVal requestedRect As Rectangle, _
   ByVal owningControl As Control, _
   ByVal alignRight As Boolean, _
   ByVal dropDownPosition As DropDownPosition, _
   ByVal repositionInfo As DropDownRepositionInfo _
) As Rectangle

Parameters

exclusionArea
The rect (in screen coordinates) which will not be obscured by the dropdown.
requestedRect
Where to try to place the dropdown (in screen coordinates).
owningControl
The control that owns the dropdown.
alignRight
If true will attempt to place the dropdown's upper right corner at the location point.
dropDownPosition
The position relative to the exclusion rect where the drop down should be placed.
repositionInfo
The information needed to reposition the drop down when there is not enough room for it.

Return Value

A System.Drawing.Rectangle describing where the drop-down will be restricted to.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also