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.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function AllowSetForegroundWindow (
processId As Integer
) As Boolean
Dim processId As Integer
Dim returnValue As Boolean
returnValue = User32.AllowSetForegroundWindow(processId)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool AllowSetForegroundWindow(
int processId
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member AllowSetForegroundWindow :
processId : int -> bool
No code example is currently available or this language may not be supported.
- 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
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.