Version

GetRequiredGrabHandleLocation Method

Gets the grab handle location which should be used for a drop down given the specified information.
Syntax
'Declaration
 
Public Shared Function GetRequiredGrabHandleLocation( _
   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 GrabHandleLocation

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 grab handle location which would be most logcal to use based on the way the drop down needs to open.
Remarks
This will only return the following values: TopLeft, TopRight, BottomLeft, and BottomRight. If the drop down has restrictions on sizing vertically or horizontally, you will need to convert these values to either Left, Top, Right, or Bottom depending on the restrictions.
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