共用方式為


InputMethod 類別

針對 Pocket PC,提供 InputPanel.InputMethodCollection 類別成員的名稱和類別 (Class) ID。這個類別無法被繼承。

命名空間:  Microsoft.WindowsCE.Forms
組件:  Microsoft.WindowsCE.Forms (在 Microsoft.WindowsCE.Forms.dll 中)

語法

'宣告
Public NotInheritable Class InputMethod
'用途
Dim instance As InputMethod
public sealed class InputMethod
public ref class InputMethod sealed
public final class InputMethod

備註

只可從 InputPanel.InputMethodCollection 存取此類別。

Topic Location
HOW TO:設定 Smartphone 輸入模式 .NET Compact Framework
HOW TO:設定 Smartphone 輸入模式 .NET Compact Framework
HOW TO:設定 Smartphone 輸入模式 .NET Compact Framework

範例

下列程式碼範例會填入 (Populate) 內含可用輸入法的清單方塊。這個程式碼範例是 InputPanel.InputMethodCollection 類別完整範例的一部分。

Private Sub GetInputMethods()
    Me.ListBox1.Items.Clear()

    ' Get the InputMethods collection and
    ' add each method to the list box.
    Dim im As InputMethod
    For Each im In  InputPanel1.InputMethods
       Me.ListBox1.Items.Add(im.Name)
    Next im
End Sub
// Get the InputMethods collection and
// add each method to the list box.
foreach (InputMethod im in ip.InputMethods)
{
 this.listBox1.Items.Add(im.Name);
}

繼承階層架構

System.Object
  Microsoft.WindowsCE.Forms.InputMethod

執行緒安全

這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。

平台

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求

版本資訊

.NET Compact Framework

支援版本:3.5、2.0

請參閱

參考

InputMethod 成員

Microsoft.WindowsCE.Forms 命名空間