Version

CalculateDropRect(Rectangle,Rectangle,Control,Boolean,DropDownPosition,DropDownRepositionInfo) Method

Calculates the rect where a drop down will actually be when requested to be in the specified rect
Syntax
'Declaration
 
Public Overloads Shared Function CalculateDropRect( _
   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

The actual rectangle where the drop down would reside if it were dropped down with the specified values.
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