谢谢各位的解答,现在代码为<br><br>unit Unit1;<br><br>interface<br><br>uses<br> Windows,imm, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls;<br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br>lpszLayoutText : pchar;<br>lpszIMEFileName : pchar;<br><br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>lpszLayoutText := '冷僻字五笔';<br>lpszIMEFileName := 'my.ime';<br>end;<br><br>end.<br><br>如何在按钮按下后用上面两个变量的参数完成输入法安装呢?我在在类里面已经加<br>入了imm,好像按钮事件里面还需要一个调用api的命令吧,请高手指教!