WinCE选择并调用输入法

WinCE选择并调用输入法

拖拽InputInPanel

        // 选择输入法
 		private void menuItem_Click(object sender, EventArgs e)
        {
            string text = ((MenuItem)sender).Text;
            this.imeButton.Text = text.Substring(0, 1);
            foreach (InputMethod method in this.inputInPanel.InputMethods)
            {
                if (method.Name == text)
                {
                    this.inputPanel.CurrentInputMethod=method;
                }
            }
            this.inputPanel.Enabled=true;
            this.imeButton.BackColor = Color.FromArgb(0, 0x80, 0xff);
        }

生成一个适合你的列表

    public class Keybord
    {
        public static InputPanel InputPanel { get; set; }
 		//调用键盘
        public static void OnBord()
        {
            string text = "";
            if (text == "")
            {
                text = "汉王栀子花输入法";
            }
            foreach (InputMethod method in InputPanel.InputMethods)
            {
                if (method.Name == text)
                {
                    InputPanel.CurrentInputMethod = method;
                }
            }
        }
        //隐藏键盘
        public static void OffBord()
        {
            InputPanel.Enabled = false;
        }
    }

你可能感兴趣的:(WinCe)