如何把Imename設置成用戶端的默認輸入法?
因為我機器上和用戶端輸入法不同,如果不設置Imename的話,則用戶每次輸入時都需要切換一次,很不方便.所以想請問各位高手,怎樣才能解決這樣的問題.

解决方案 »

  1.   

    In the FormCreate event, set the ImeName of all the input fields (such as TEdit, TMemo etc.):var
      I: Integer;
    begin
      for I := 0 to ComponentCount - 1 do
      begin
        if Components[I] is TEdit then
          TEdit(Components[I]).ImeName := 'Your default IME name';
        if Components[I] is TMemo then
          TMemo(Components[I]).ImeName := 'Your default IME name';
      end;
    end;
      

  2.   

    在有输入功能的控件上,有两个属性,imeMode和imeName,
    ImeMode是表示输入法控制模式,它有好多种值
    imDisable:Shutdown the IME. imDisable has no effect on Chinese, Taiwanese, or Korean IMEs.
    imClose: Close the IME conversion window, but leave the IME running in the background. The IME can be reactivated by a hot key combination.imOpen: Open the IME conversion window. The conversion mode is the last conversion mode used by the IME.imDontCare:Launch the IME if it is disabled. The conversion mode is the last conversion mode used by the IME.imSAlpha: Open the IME conversion window and set the conversion mode to accept single-width Roman alphabet input.imAlpha: Open the IME conversion window and set the conversion mode to accept double-width Roman alphabet input.imHira: Open the IME conversion window and set the conversion mode to double-width Hiragana. imHira is only available for Japanese IMEs.imSKata: Open the IME conversion window and set the conversion mode to single-width Katakana (Hankaku Katakana). imSKata is only available for Japanese IMEs.imKata: Open the IME conversion window and set the conversion mode to double-width Katakana (Zenkaku Katakana). imKata is only available for Japanese IMEs.imChinese:Open the IME conversion window and set the conversion mode to double-width Chinese. imChinese is only available for Chinese IMEs.imSHanguel:Open the IME conversion window and set the conversion mode to single-width Hanguel.imSHanguel is only available for Korean IMEs.imHanguel:Open the IME conversion window and set the conversion mode to double-width Hanguel. imHanguel is only available for Korean IMEs.
    能看懂吗,这是Delphi的帮助,可以查一下英文。
    我一般都会设成imDontCare,它切换到机器上默认的输入法。这是大部分软件的方法。如果是你确认不会输入中文,只能输入英文,可以选择关掉的那个值。这些值里有的只对特定的语言起作用。
    ImeName是个挺讨厌的东西,它总是把你开发的机器里的输入法给自动给附值。如果你设成imDontCare,而这个值又设成你机器上的输入法,那用户就要不断的切换了,哈哈。建议的方法:用一个能查找替换的软件,如EditPlus,把所有dfm的文件中的值换掉就行了。怎么修改dfm中的值我就不说了,如果你还不懂,再问我。
      

  3.   

    别忘了把那个ImeName 值弄成空的,或在dmf中把它的那行删除就行了
      

  4.   

    "ImeName是个挺讨厌的东西,它总是把你开发的机器里的输入法给自动给附值。如果你设成imDontCare,而这个值又设成你机器上的输入法,那用户就要不断的切换了"
    跟你說的一樣,我現在就是這個情況,把Imename設成空也沒用.
    你說的那個EditPlus是做甚麼用的
      

  5.   

    EditPlus 是一个挺好用的编辑软件,写脚本语言的可能都用过,功能可以说只是一个文字编辑,不过比写字版好用多了,多文档的,功能较全,体积也不大,你要用可以到我的网站
    http://www.mynetlife.com上下载
      

  6.   

    你用一个批量替换工具,把所有dmf里的Imename设成空,把imeModey设成imDontCare,在你每次正式发布的时候替换一遍就行了。
      

  7.   

    咳咳,确实是够烦的,再好的方法我还没找到。
    能解决问题就好了,要不就要从头研究Delphi的IDE吧,最好是找个Borland的人问一问。
      

  8.   

    麻烦有空的帮小妹解决一下这个问题
    http://expert.csdn.net/Expert/topic/2385/2385608.xml?temp=.8815271
    先谢了
      

  9.   

    mynetlife(爬虫) 
    真是不好意思,很久没关注这张贴了,所以到现在才给分