User32SetActiveWindow(SafeHandle) Method

Activates a window. The window must be attached to the calling thread's message queue.

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 SetActiveWindow(
	SafeHandle hWnd
)

Parameters

hWnd  SafeHandle
A IntPtr handle to the top-level window to be activated.

Return Value

IntPtr
If the function succeeds, the return value is the IntPtr handle to the window that was previously active.

If the function fails, the return value is Zero.

Remarks

See Also