home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 3_2004-2005.ISO / Data / Zips / AllAPI_API179141992004.psc / API / A / ActivateKeyboardLayout.api next >
Encoding:
INI File  |  2004-08-30  |  3.3 KB  |  53 lines

  1. [NAME]
  2. ActivateKeyboardLayout
  3. [DESCRIPTION]
  4. The ActivateKeyboardLayout function 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.
  5. [DECLARATION]
  6. Declare Function ActivateKeyboardLayout Lib "user32" (ByVal HKL As Long, ByVal Flags As Long) As Long
  7. [VBNET]
  8. N/A
  9. [OS]
  10. Requires Windows NT 3.1 or later; Requires Windows 95 or later
  11. [LIBRARY]
  12. User32
  13. [PARAMETERS]
  14. ╖ hkl 
  15. [in] Input locale identifier to be activated. 
  16. Windows 95/98/Me: This parameter can be obtained using LoadKeyboardLayout or GetKeyboardLayoutList, or it can be one of the values in the table that follows. 
  17. Windows NT/2000/XP: The input locale identifier must have been loaded by a previous call to the LoadKeyboardLayout function. This parameter must be either the handle to a keyboard layout or one of the following values.
  18. HKL_NEXT 
  19.  Selects the next locale identifier in the circular list of loaded locale identifiers maintained by the system. 
  20. HKL_PREV 
  21.  Selects the previous locale identifier in the circular list of loaded locale identifiers maintained by the system. 
  22.  
  23. ╖ Flags 
  24. [in] Specifies how the input locale identifier is to be activated. This parameter can be one of the following values.
  25.  
  26. KLF_REORDER 
  27.  If this bit is set, the system's circular list of loaded locale identifiers is reordered by moving the locale identifier to the head of the list. If this bit is not set, the list is rotated without a change of order. 
  28. For example, if a user had an English locale identifier active, as well as having French, German, and Spanish locale identifiers loaded (in that order), then activating the German locale identifier with the KLF_REORDER bit set would produce the following order: German, English, French, Spanish. Activating the German locale identifier without the KLF_REORDER bit set would produce the following order: German, Spanish, English, French.
  29. If less than three locale identifiers are loaded, the value of this flag is irrelevant. 
  30.  
  31. KLF_RESET 
  32.  Windows 2000/XP: If set but KLF_SHIFTLOCK is not set, the Caps Lock state is turned off by pressing the Caps Lock key again. If set and KLF_SHIFTLOCK is also set, the Caps Lock state is turned off by pressing either SHIFT key. 
  33. These two methods are mutually exclusive, and the setting persists as part of the User's profile in the registry.
  34.  
  35. KLF_SETFORPROCESS 
  36.  Windows 2000/XP: Activates the specified locale identifier for the entire process and sends the WM_INPUTLANGCHANGE message to the current thread's Focus or Active window.  
  37.  
  38. KLF_SHIFTLOCK 
  39.  Windows 2000/XP: This is used with KLF_RESET. See KLF_RESET for an explanation. 
  40.  
  41. KLF_UNLOADPREVIOUS 
  42.  This flag is unsupported. Use the UnloadKeyboardLayout function instead. 
  43. [RETURNS]
  44. Windows NT 3.51 and earlier: The return value is of type BOOL. If the function succeeds, it is nonzero. If the function fails, it is zero.
  45.  
  46. Windows 95/98, Windows NT 4.0 and later: The return value is of type HKL. If the function succeeds, the return value is the previous input locale identifier. Otherwise, it is zero. 
  47.  
  48. To get extended error information, use the GetLastError function.
  49. [EXAMPLES]
  50. Keyboard Layout*FC9A0C9925093EB7C2DE5C600A38F0C9.html
  51. [RELATED]
  52. GetKeyboardLayout
  53.