Udostępnij za pośrednictwem


How to: Set Pocket PC Input Methods

The Pocket PC contains a collection of input methods that specify how the user enters text and data. When you set the CurrentInputMethod property for an InputPanel, the method remains in effect until changed by the user.

A Pocket PC has the following input methods, which can vary by manufacturer:

  • Transcriber

  • Keyboard

  • Letter Recognizer

  • Block Recognizer

The InputPanel.InputMethodCollection provides access to the installed input methods on a device. You can identity an input method by either its name or GUID (the Name property or Clsid property).

Example

The following code example sets a preferred input method by matching a specified method with a method in the collection.

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;

Compiling the Code

This example requires references to the following namespaces:

See Also

Reference

InputPanel.InputMethodCollection

Other Resources

Pocket PC Development and the .NET Compact Framework