This documentation is archived and is not being maintained.

Control.GetChildAtPoint Method (Point)

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

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

'Declaration
Public Function GetChildAtPoint ( _
	pt As Point _
) As Control
'Usage
Dim instance As Control
Dim pt As Point
Dim returnValue As Control

returnValue = instance.GetChildAtPoint(pt)
public Control GetChildAtPoint (
	Point pt
)
public function GetChildAtPoint (
	pt : Point
) : Control
Not applicable.

Parameters

pt

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.

Return Value

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

If there is no child control at the specified point, the GetChildAtPoint method returns a null reference (Nothing in Visual Basic).

  • 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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: