代码改变世界

在Windows Mobile上控制输入法

2007-11-28 15:15  ruinet  阅读(1414)  评论(1编辑  收藏  举报

  1. 获取输入法

新建Form ,拖入设备组件inputPanel

foreach (InputMethod im in this.inputPanel1 .InputMethods)

    {

        this.listBox1.Items.Add(im.Name);

    }

2. 显示输入面板

   [System.Runtime.InteropServices.DllImport("coredll.dll")]

internal static extern uint SipShowIM(long  flags);

SipShowIM(0);//隐藏

SipShowIM(0);//显示

3. 设置控件输入法

   Microsoft.WindowsCE.Forms.InputModeEditor.SetInputMode(this.textBox1, InputMode. Numeric);


free web counter