Control.GetChildAtPoint Control.GetChildAtPoint Control.GetChildAtPoint Control.GetChildAtPoint Method

Definition

Retrieves the child control at a specified location.

Overloads

GetChildAtPoint(Point) GetChildAtPoint(Point) GetChildAtPoint(Point) GetChildAtPoint(Point)

Retrieves the child control that is located at the specified coordinates.

GetChildAtPoint(Point, GetChildAtPointSkip) GetChildAtPoint(Point, GetChildAtPointSkip) GetChildAtPoint(Point, GetChildAtPointSkip) GetChildAtPoint(Point, GetChildAtPointSkip)

Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.

GetChildAtPoint(Point) GetChildAtPoint(Point) GetChildAtPoint(Point) GetChildAtPoint(Point)

Retrieves the child control that is located at the specified coordinates.

public:
 System::Windows::Forms::Control ^ GetChildAtPoint(System::Drawing::Point pt);
public System.Windows.Forms.Control GetChildAtPoint (System.Drawing.Point pt);
member this.GetChildAtPoint : System.Drawing.Point -> System.Windows.Forms.Control
Public Function GetChildAtPoint (pt As Point) As Control

Parameters

pt
Point Point Point Point

A Point that contains the coordinates where you want to look for a control. Coordinates are expressed relative to the upper-left corner of the control's client area.

Returns

A Control that represents the control that is located at the specified point.

Remarks

If there is no child control at the specified point, the GetChildAtPoint method returns null.

Security

UIPermission
for all windows to call this method if the control returned is not a child of the control. Associated enumeration: AllWindows value of UIPermissionWindow.

See also

GetChildAtPoint(Point, GetChildAtPointSkip) GetChildAtPoint(Point, GetChildAtPointSkip) GetChildAtPoint(Point, GetChildAtPointSkip) GetChildAtPoint(Point, GetChildAtPointSkip)

Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.

public:
 System::Windows::Forms::Control ^ GetChildAtPoint(System::Drawing::Point pt, System::Windows::Forms::GetChildAtPointSkip skipValue);
public System.Windows.Forms.Control GetChildAtPoint (System.Drawing.Point pt, System.Windows.Forms.GetChildAtPointSkip skipValue);
member this.GetChildAtPoint : System.Drawing.Point * System.Windows.Forms.GetChildAtPointSkip -> System.Windows.Forms.Control
Public Function GetChildAtPoint (pt As Point, skipValue As GetChildAtPointSkip) As Control

Parameters

pt
Point Point Point Point

A Point that contains the coordinates where you want to look for a control. Coordinates are expressed relative to the upper-left corner of the control's client area.

skipValue
GetChildAtPointSkip GetChildAtPointSkip GetChildAtPointSkip GetChildAtPointSkip

One of the values of GetChildAtPointSkip, determining whether to ignore child controls of a certain type.

Returns

The child Control at the specified coordinates.

Applies to