如题,刚刚碰到这个问题,郁闷

解决方案 »

  1.   

    http://www.2ccc.com/article.asp?articleid=2139这里有代码下载,很简单的。
      

  2.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, ComCtrls,imm;type
      TForm1 = class(TForm)
        ProgressBar1: TProgressBar;
        Button1: TButton;
        Label1: TLabel;
        Label2: TLabel;
        Label3: TLabel;
        Label4: TLabel;
        Edit1: TEdit;
        Edit2: TEdit;
        ComboBox1: TComboBox;
        Memo1: TMemo;
        procedure Button1Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure OpenIme(imename:string);var
    I:integer;
    myhkl:hkl;
    begin
    if ImeName<>'' then
    begin
    if Screen.Imes.Count<>0 then
    begin
    I:=screen.Imes.indexof(imename);
    if I>=0 then
      myhkl:=hkl(screen.Imes.objects[i]);
      activatekeyboardlayout(myhkl,
      KLF_ACTIVATE);//设置相应的输入法
    end;
    end;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
    OpenIme(ComboBox1.Text);   //打开用户选择的输入法
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
    ComboBox1.Items.CommaText:=Screen.Imes.CommaText;    //得到系统的输入法
    ComboBox1.ItemIndex := 0;
    end;end.
      

  3.   

    好象不行啊,在DBGrid里边输入的时候就不灵了哇,要怎么搞啊?
      

  4.   

    不好意思,还是有点毛病
      DBEdit1.Text := Screen.Imes.Text;   
      DBEdit2.Text := Screen.Imes.Text;
    我改成上面后,DBEdit1.Text就会显示输入法名称,改成下面的,又不起作用了
      DBEdit1.imename := Screen.Imes.Text;   
      DBEdit2.imename := Screen.Imes.Text;