——此文章摘自《Delphi开发经验技巧宝典》定价¥特价¥ 购买>>http://tracklinktechcn/?m_id=dangdang&a_id=A&l=&l_type= width= height= border= nosave> 通过activatekeyboardlayout方法切换到指定的输入法主要代码如下 procedure TFormInput(InputName: string); var I: Integer; myhkl: hkl; begin ImeName := InputName; if Length(ImeName) <> then begin if ScreenImesCount <> then begin I := screenImesindexof(imename); if I >= then myhkl := hkl(screenImesobjects[i]) else begin ShowMessage(此输入法没有启用); end; activatekeyboardlayout(myhklKLF_ACTIVATE); //设置相应的输入法 end; end; end; right>[http://developcsaicn/delphi/htm>] [] |