Version

PointInElement(Point,Boolean) Method

Checks if the point is over the element.
Syntax
'Declaration
 
Public Overloads Function PointInElement( _
   ByVal point As Point, _
   ByVal excludeOverlappingSiblings As Boolean _
) As Boolean
public bool PointInElement( 
   Point point,
   bool excludeOverlappingSiblings
)

Parameters

point
In client coordinates
excludeOverlappingSiblings
Check to see if overlapping siblings contain this point

Return Value

Returns true if the point is over the element.
Example
This sample uses the ActiveRowUIElement of an UltraWinGrid to hit test whether or not the passed in point is over that element.

Private Function IsPointOverUltraGridActiveRow(ByVal pt As Point) As Boolean

    If Not Me.ultraGrid1.DisplayLayout.ActiveRow Is Nothing Then

        If (Me.ultraGrid1.DisplayLayout.ActiveRow.GetUIElement().PointInElement(pt)) Then
            Return True
        End If
    End If

    Return False

End Function
using System.Diagnostics;
using System.Windows.Forms;		

private void ultraGrid1_MouseMove(object sender, MouseEventArgs e)
{

	if(IsPointOverUltraGridActiveRow(new Point(e.X,e.Y)))
	{
		Debug.WriteLine("Over Active Row");
	}
	else
	{
		Debug.WriteLine("Not Over Active Row");
	}

}

private bool IsPointOverUltraGridActiveRow(Point pt)
{

	if(null != this.ultraGrid1.DisplayLayout.ActiveRow)
	{

		if(this.ultraGrid1.DisplayLayout.ActiveRow.GetUIElement().PointInElement(pt))
			return true;

	}

	return false;

}
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