User32EnableWindow(IntPtr, 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.
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 EnableWindow(
IntPtr hWnd,
bool enable
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function EnableWindow (
hWnd As IntPtr,
enable As Boolean
) As Boolean
Dim hWnd As IntPtr
Dim enable As Boolean
Dim returnValue As Boolean
returnValue = User32.EnableWindow(hWnd,
enable)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool EnableWindow(
IntPtr hWnd,
bool enable
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member EnableWindow :
hWnd : IntPtr *
enable : bool -> bool
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
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.
Boolean
If the the window is enabled, the return value is
.
If the window is not enabled, the return value is
.