如何:设置 Pocket PC 输入方法

更新:2007 年 11 月

Pocket PC 包含指定用户如何输入文本和数据的输入方法的集合。当您为 InputPanel 设置 CurrentInputMethod 属性时,该方法将保持有效,直到用户更改它为止。

Pocket PC 具有下列输入方法,这些输入方法因制造商的不同而不同:

  • 抄录器

  • 键盘

  • 字母识别器

  • 块识别器

InputPanel.InputMethodCollection 提供对已安装在设备上的输入方法的访问权。您可以按输入方法的名称或 GUID(Name 属性或 Clsid 属性)标识输入方法。

示例

下面的代码示例通过将指定的方法与集合中的某种方法匹配来设置首选的输入方法。

For Each m As Microsoft.WindowsCE.Forms.InputMethod In InputPanel1.InputMethods
    If m.Name = "Letter Recognizer" Then
        InputPanel1.CurrentInputMethod = m
    End If
Next
InputPanel1.Enabled = True
foreach (InputMethod m in inputPanel1.InputMethods)
{
    if (m.Name == "Letter Recognizer")
        inputPanel1.CurrentInputMethod = m;
}
inputPanel1.Enabled = true;

编译代码

此示例需要引用下面的命名空间:

请参见

参考

InputPanel.InputMethodCollection

其他资源

Pocket PC 开发和 .NET Compact Framework