Control.GetChildAtPoint Method
Definition
Retrieves the child control at a specified location.
Overloads
GetChildAtPoint(Point) |
Retrieves the child control that is located at the specified coordinates. |
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)
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
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
.
See also
Applies to
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
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
One of the values of GetChildAtPointSkip, determining whether to ignore child controls of a certain type.
Returns
The child Control at the specified coordinates.