Compartilhar via


InputPanel.CurrentInputMethod Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the input method for the Pocket PC.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

Syntax

'Declaration
Public Property CurrentInputMethod As InputMethod
    Get
    Set
'Usage
Dim instance As InputPanel
Dim value As InputMethod

value = instance.CurrentInputMethod

instance.CurrentInputMethod = value
public InputMethod CurrentInputMethod { get; set; }
public:
property InputMethod^ CurrentInputMethod {
    InputMethod^ get ();
    void set (InputMethod^ value);
}
member CurrentInputMethod : InputMethod with get, set

Property Value

Type: Microsoft.WindowsCE.Forms.InputMethod
An object that represents an input method.

Remarks

You can set this property to any one of the available input methods on the device.

Examples

The following example sets this property to a method selected in a list box. This example is part of a larger example provided for the InputPanel.InputMethodCollection class.

' This event handler iterates through the
' InputMethodCollection and sets the input method
' to the input method selected in the list box.
' When a member of the collection is the
' same the selected value in the list box, that
' method is set to the current input method.
Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged

   ' Get the selected input method from the list box.
   Dim strIM As String
   strIM = ListBox1.SelectedItem.ToString()

   ' Iterate through the input method collection.
   ' When there is a match with the input method
   ' selected in the list box, set the
   ' CurrentInputMethod property to the selected method.
   Dim im As InputMethod
   For Each im In  InputPanel1.InputMethods
      If im.Name = strIM Then
         ' Change the input method.
         InputPanel1.CurrentInputMethod = im
      End If
   Next im
End Sub
// Get the selected input method from the list box.
string strIM;
strIM = listBox1.SelectedItem.ToString();

// Iterate through the input method collection.
// When there is a match with the input method
// selected in the list box, set the
// CurrentInputMethod property to the selected method.
foreach (InputMethod im in ip.InputMethods)
{
 if (im.Name == strIM)
  // Change the input method.
  ip.CurrentInputMethod = im;
}

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

InputPanel Class

InputPanel Members

Microsoft.WindowsCE.Forms Namespace