User32EnableWindow(SafeHandle, Boolean) Method

Enables or disables mouse and keyboard input to the specified window or control.

When input is disabled, the window does not receive input such as mouse clicks and key presses.

When input is enabled, the window receives all 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 EnableWindow(
	SafeHandle hWnd,
	bool enable
)

Parameters

hWnd  SafeHandle
A handle to the window to be enabled or disabled.
enable  Boolean
Indicates whether to enable or disable the window.

If this parameter is , the window is enabled.

If the parameter is , the window is disabled.

Return Value

Boolean
If the the window is enabled, the return value is .

If the window is not enabled, the return value is .

Remarks

See Also