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.
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", ExactSpelling = true, SetLastError = true)]
public static IntPtr ActivateKeyboardLayout(
IntPtr hkl,
KeyboardLayoutFlags flags
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function ActivateKeyboardLayout (
hkl As IntPtr,
flags As KeyboardLayoutFlags
) As IntPtr
Dim hkl As IntPtr
Dim flags As KeyboardLayoutFlags
Dim returnValue As IntPtr
returnValue = User32.ActivateKeyboardLayout(hkl,
flags)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static IntPtr ActivateKeyboardLayout(
IntPtr hkl,
KeyboardLayoutFlags flags
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member ActivateKeyboardLayout :
hkl : IntPtr *
flags : KeyboardLayoutFlags -> IntPtr
No code example is currently available or this language may not be supported.
- 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
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.