Export (0) Print
Expand All
Expand Minimize

Control.FromChildHandle Method

Retrieves the control that contains the specified handle.

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

public:
static Control^ FromChildHandle (
	IntPtr handle
)
public static Control FromChildHandle (
	IntPtr handle
)
public static function FromChildHandle (
	handle : IntPtr
) : Control
Not applicable.

Parameters

handle

The window handle (HWND) to search for.

Return Value

The Control that represents the control associated with the specified handle; returns a null reference (Nothing in Visual Basic) if no control with the specified handle is found.

This method searches up the window handle parent chain until it finds a handle that is associated with a control. This method is more reliable than the FromHandle method, because it correctly returns controls that own more than one handle.

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

Community Additions

ADD
Show:
© 2014 Microsoft