User32AllowSetForegroundWindow Method

Enables the specified process to set the foreground window using the SetForegroundWindow(IntPtr) function.

The calling process must already be able to set the foreground window.

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 bool AllowSetForegroundWindow(
	int processId
)

Parameters

processId  Int32
The identifier of the process that will be enabled to set the foreground window.

If this parameter is ASFW_ANY (-1), all processes will be enabled to set the foreground window

Return Value

Boolean
If the function succeeds, the return value is . If the function fails, the return value is .

Remarks

See Also