User32VkKeyScan Method
Note: This API is now obsolete.
Translates a character to the corresponding virtual-key code and shift state for the current 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", SetLastError = true)]
[ObsoleteAttribute("This function has been superseded by the VkKeyScanEx function. You can still use VkKeyScan, however, if you do not need to specify a keyboard layout.",
false)]
public static short VkKeyScan(
char character
)
<DllImportAttribute("User32.dll", SetLastError := true>]
<ObsoleteAttribute("This function has been superseded by the VkKeyScanEx function. You can still use VkKeyScan, however, if you do not need to specify a keyboard layout.",
false)>
Public Shared Function VkKeyScan (
character As Char
) As Short
Dim character As Char
Dim returnValue As Short
returnValue = User32.VkKeyScan(character)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
[ObsoleteAttribute(L"This function has been superseded by the VkKeyScanEx function. You can still use VkKeyScan, however, if you do not need to specify a keyboard layout.",
false)]
static short VkKeyScan(
wchar_t character
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
[<ObsoleteAttribute("This function has been superseded by the VkKeyScanEx function. You can still use VkKeyScan, however, if you do not need to specify a keyboard layout.",
false)>]
static member VkKeyScan :
character : char -> int16
No code example is currently available or this language may not be supported.
- character Char
-
The character to be translated into a virtual-key code.
Int16
If the function succeeds,
the low-order byte of the return value contains the virtual-key code,
and the high-order byte contains the shift state.
If the function finds no key that translates to the passed character code,
both the low-order and high-order bytes contain
–1.