User32BlockInput Method

Blocks keyboard and mouse input events from reaching applications.

Note that only the thread that blocked input can successfully unblock input.

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 BlockInput(
	bool blockIt
)

Parameters

blockIt  Boolean
The function's purpose.

If this parameter is , keyboard and mouse input events are blocked.

If this parameter is , keyboard and mouse events are unblocked.

Return Value

Boolean
If the function succeeds, the return value is .

If input is already blocked, the return value is .

Remarks

See Also