User32ActivateKeyboardLayout Method

Sets the input locale identifier (formerly called the keyboard layout handle) for the calling thread or the current process.

The input locale identifier specifies a locale as well as the physical layout of the keyboard.

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", ExactSpelling = true, SetLastError = true)]
public static IntPtr ActivateKeyboardLayout(
	IntPtr hkl,
	KeyboardLayoutFlags flags
)

Parameters

hkl  IntPtr
Input locale identifier to be activated.

The input locale identifier must have been loaded by a previous call to the LoadKeyboardLayout(String, KeyboardLayoutFlags) function.

flags  KeyboardLayoutFlags
Specifies how the input locale identifier is to be activated

Return Value

IntPtr
The return value is of type HKL.

If the function succeeds, the return value is the previous input locale identifier. Otherwise, it is Zero.

Remarks

See Also