Home > Back-end >  Delphi under Windows 7 how to detect whether it is Chinese input method, immisime failure under Wind
Delphi under Windows 7 how to detect whether it is Chinese input method, immisime failure under Wind

Time:09-27

Such as topic, made a background program to switch input method, using the immisime (getkeyboardlayout (GetWindowThreadProcessId (GetForegroundWindow))) to determine whether it is Chinese input method, under the XP program is normal, but always return true under Windows 7,

Ask how to determine whether the input method under Windows 7 as the Chinese input method

CodePudding user response:

I don't know, can only consult http://bbs.csdn.net/topics/320199383

CodePudding user response:

 procedure TSetImeFrm. GetImeList (List: TStrings); 
Var I: integer;
The begin
For I:=0 to screen. Imes. Do the count - 1
The begin
If I=0 then
ImeNameS:=screen. Imes. Strings [I];
List. The Add (screen. Imes. Strings [I]);//acquisition system has been installed in the Chinese input method
end;
end;


Again through the string, judge whether the Chinese input method,

CodePudding user response:

refer to the second floor lyhoo163 response:
 procedure. TSetImeFrm GetImeList (List: TStrings); 
Var I: integer;
The begin
For I:=0 to screen. Imes. Do the count - 1
The begin
If I=0 then
ImeNameS:=screen. Imes. Strings [I];
List. The Add (screen. Imes. Strings [I]);//acquisition system has been installed in the Chinese input method
end;
end;


Again through the string, judge whether the Chinese input method,


Ask this good, borrow road, do not know to have automatic switch input method under the Windows 7 code?
  • Related