ActivateKeyboardLayout 設置調用線程或當前進程為輸入區域設置標識符; System.Windows.Forms.InputLanguage.CurrentInputLanguage 獲取或設置當前線程的輸入語言 /// <summary> /// 設置調用線程或當前進程為輸入區
ActivateKeyboardLayout 設置調用線程或當前進程為輸入區域設置標識符;
System.Windows.Forms.InputLanguage.CurrentInputLanguage 獲取或設置當前線程的輸入語言
/// <summary> /// 設置調用線程或當前進程為輸入區域設置標識符. /// </summary> /// <param name="HKL">被激活的輸入區域設置標識符,值為鍵盤佈局句柄或者是1或0</param> /// <param name="flags">指定要激活的輸入區域設置標識符是如何被激活的</param> /// <returns>返回值的類型是HKL。如果函數成功,返回值是以前的輸入區域設置標識符。否則,它是零</returns> [DllImport("user32")] public static extern int ActivateKeyboardLayout(int HKL, int flags);
相關鏈接
預設輸入區域設置:https://msdn.microsoft.com/zh-cn/library/cc766503(v=ws.10)
ActivateKeyboardLayout:https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms646289(v=vs.85).aspx
InputLanguage.CurrentInputLanguage:https://msdn.microsoft.com/zh-cn/library/system.windows.forms.inputlanguage.currentinputlanguage(v=vs.110).aspx