Imes方式dephi7,win7 以下代码正常,win10是空白获取不成功。

procedure TForm1.FormCreate(Sender: TObject);
begin
self.ListBox1.Items.AddStrings( screen.Imes );
end;

procedure TForm1.ListBox1DblClick(Sender: TObject);
begin
if self.ListBox1.Items.Count>0 then
begin
    self.Edit1.ImeName:= self.ListBox1.Items.Strings[ self.ListBox1.itemindex ];
end;

  • delphi7编译环境

win7:获得1个,中文(简体) - 搜狗拼音输入法

edit1.imeName='中文(简体) - 搜狗拼音输入法'; //有效果

win10:空白,获取失败。

  • delphi11.3编译环境

win7:操作系统:

Chinese (Simplified) - US Keyboard
Chinese (Simplified) - US Keyboard
US

edit1.imeNmae:='中文(简体) - 搜狗拼音输入法';//没效果

win10操作系统:

Chinese (Simplified) - US Keyboard
US

由此看见,delphi11.3IDE环境对Imes修改了算法,导致在win7不能正常获取结果。

posted on 2026-02-23 15:42  lypzxy  阅读(9)  评论(0)    收藏  举报