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;
}
}