User32GetTopWindow(SafeHandle) Method

Examines the Z order of the child windows associated with the specified parent window and retrieves a handle to the child window at the top of the Z order.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static IntPtr GetTopWindow(
	SafeHandle hWnd
)

Parameters

hWnd  SafeHandle
A handle to the parent window whose child windows are to be examined.

If this parameter is Zero, the function returns a handle to the window at the top of the Z order.

Return Value

IntPtr
If the function succeeds, the return value is a handle to the child window at the top of the Z order.

If the specified window has no child windows, the return value is Zero.

Remarks

See Also