InputPanel.InputMethodCollectionとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > InputPanel.InputMethodCollectionの意味・解説 

InputPanel.InputMethodCollection クラス

Pocket PCインストールされた、すべての入力方式ソフトウェアアクセスできるようにします。このクラス継承できません。

名前空間: Microsoft.WindowsCE.Forms
アセンブリ: Microsoft.WindowsCE.Forms (microsoft.windowsce.forms.dll 内)
構文構文

Public NotInheritable Class
 InputMethodCollection
    Implements IList, ICollection, IEnumerable
Dim instance As InputMethodCollection
public sealed class InputMethodCollection :
 IList, ICollection, IEnumerable
public ref class InputMethodCollection sealed
 : IList, ICollection, IEnumerable
public final class InputMethodCollection implements
 IList, ICollection, 
    IEnumerable
public final class InputMethodCollection implements
 IList, ICollection, 
    IEnumerable
解説解説
使用例使用例

InputPanel.InputMethodCollection列挙し利用できる入力方式リスト ボックス表示するコード例次に示しますユーザー入力方式選択すると、CurrentInputMethod プロパティはその入力方式設定されます。ユーザーに対してキーボードおよび他の入力領域表示されるように、入力パネルEnabled プロパティは、true設定されます。

Imports System
Imports System.Windows.Forms
Imports Microsoft.WindowsCE.Forms
Imports Microsoft.VisualBasic

Public Class Form1
   Inherits System.Windows.Forms.Form

   Private WithEvents ListBox1 As
 System.Windows.Forms.ListBox
   Private TextBox1 As System.Windows.Forms.TextBox
   
   Private InputPanel1 As Microsoft.WindowsCE.Forms.InputPanel
   
   
   Public Sub New()
      InitializeComponent()
      
      'Display OK Button for closing the application.
      Me.MinimizeBox = False
      
      MsgBox(InputPanel1.InputMethods.Count.ToString())
      
      ' Display the input panel.
      InputPanel1.Enabled = True
      
      ' Get the input methods to populate the list box.
      ' Select the first method.
      GetInputMethods()
      ListBox1.SelectedIndex = 0
      
      ' Set the focus on the text box to render input from the input
 panel.
      TextBox1.Focus()
   End Sub
    
   Protected Overrides Sub
 Dispose(disposing As Boolean)
      MyBase.Dispose(disposing)
   End Sub
   
   Private Sub InitializeComponent()
      Me.InputPanel1 = New Microsoft.WindowsCE.Forms.InputPanel
      Me.ListBox1 = New System.Windows.Forms.ListBox
      Me.TextBox1 = New System.Windows.Forms.TextBox
      '
      ' ListBox1
      '
      Me.ListBox1.Location = New System.Drawing.Point(8,
 40)
      Me.ListBox1.Size = New System.Drawing.Size(200,
 80)
      '
      ' TextBox1
      '
      Me.TextBox1.Location = New System.Drawing.Point(8,
 140)
      Me.TextBox1.Size = New System.Drawing.Size(200,
 200)
      '
      ' Form1
      '
      Me.Controls.Add(ListBox1)
      Me.Controls.Add(TextBox1)
      Me.Text = "Input Methods"
   End Sub
   
   
   Shared Sub Main()
      Application.Run(New Form1())
   End Sub
   
  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
   
   ' 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

End Class 

' Note that the InputMethodCollection
' can also be enumerated as follows:
'  InputPanel.InputMethodCollection imc;
'  imc = InputPanel1.InputMethods;
'  for (int i = 0; i < imc.Count; i++)
'  {
'   if (imc[i].Name == strIM)
'   {
'    // Change input method.
'    InputPanel1.CurrentInputMethod = imc[i];
'
'    break;
'   }
'  }
using System;
using System.Windows.Forms;
using Microsoft.WindowsCE.Forms;

namespace InputMethodsTest
{
public class Form1 : System.Windows.Forms.Form
{
 private System.Windows.Forms.MainMenu mainMenu1;
 private System.Windows.Forms.ListBox listBox1;
 private System.Windows.Forms.TextBox textBox1;

 private Microsoft.WindowsCE.Forms.InputPanel ip;

 public Form1()
 {
  InitializeComponent();

  //Display OK Button for closing the application.
  this.MinimizeBox = false;

  MessageBox.Show(ip.InputMethods.Count.ToString());

  // Display the input panel.
  ip.Enabled = true;

  // Get the input methods to populate the list box.
  // Select the first method.
  GetInputMethods();
  listBox1.SelectedIndex = 0;

  // Set the focus on the text box to render input from the input panel.
  textBox1.Focus();

 }
 protected override void Dispose( bool
 disposing )
 {
  base.Dispose( disposing );
 }
 #region Windows Form Designer generated code

 private void InitializeComponent()
 {
  this.mainMenu1 = new System.Windows.Forms.MainMenu();
  this.ip = new InputPanel();
  this.listBox1 = new ListBox();
  this.textBox1 = new TextBox();
  //
  // listBox1
  //
  this.listBox1.Location = new System.Drawing.Point(8,
 40);
  this.listBox1.Size = new System.Drawing.Size(200,
 80);
  this.listBox1.SelectedIndexChanged += new
 System.EventHandler(this.listBox1_SelectedIndexChanged);
  //
  // textBox1
  //
  this.textBox1.Location = new System.Drawing.Point(8,
 140);
  this.textBox1.Size = new System.Drawing.Size(200,
 200);
  //
  // Form1
  //
  this.Controls.Add(this.listBox1);
  this.Controls.Add(this.textBox1);
  this.Menu = this.mainMenu1;
  this.Text = "Input Methods";
 }
 #endregion

 static void Main()
 {
  Application.Run(new Form1());
 }

 private void GetInputMethods()
 {
  this.listBox1.Items.Clear();


 // Get the InputMethods collection and
 // add each method to the list box.
 foreach (InputMethod im in ip.InputMethods)
 {
  this.listBox1.Items.Add(im.Name);
 }
 }

 // 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 void listBox1_SelectedIndexChanged(object
 sender, EventArgs e)
 {

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

 // Note that the InputMethodCollection
 // can also be enumerated as follows:
 //  InputPanel.InputMethodCollection imc;
 //  imc = ip.InputMethods;
 //  for (int i = 0; i < imc.Count; i++)
 //  {
 //   if (imc[i].Name == strIM)
 //   {
 //    // Change input method.
 //    ip.CurrentInputMethod = imc[i];
 //
 //    break;
 //   }
 //  }

 }
}
}
継承階層継承階層
System.Object
  Microsoft.WindowsCE.Forms.InputPanel.InputMethodCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
InputPanel.InputMethodCollection メンバ
Microsoft.WindowsCE.Forms 名前空間
その他の技術情報
InputPanel コンポーネント
方法 : InputPanel コンポーネント使用する

InputPanel.InputMethodCollection プロパティ


パブリック プロパティパブリック プロパティ

明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.IList.Item このメンバ説明については、IList.Item のトピック参照してください
参照参照

関連項目

InputPanel.InputMethodCollection クラス
Microsoft.WindowsCE.Forms 名前空間

その他の技術情報

InputPanel コンポーネント
方法 : InputPanel コンポーネント使用する

InputPanel.InputMethodCollection メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.ICollection.CopyTo このメンバ説明については、ICollection.CopyTo のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Add このメンバ説明については、IList.Add のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Clear このメンバ説明については、IList.Clear のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Contains このメンバ説明については、IList.Contains のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.IndexOf このメンバ説明については、IList.IndexOf のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Insert このメンバ説明については、IList.Insert のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Remove このメンバ説明については、ArrayList.Remove のトピック参照してください
参照参照

関連項目

InputPanel.InputMethodCollection クラス
Microsoft.WindowsCE.Forms 名前空間

その他の技術情報

InputPanel コンポーネント
方法 : InputPanel コンポーネント使用する

InputPanel.InputMethodCollection メンバ

Pocket PCインストールされた、すべての入力方式ソフトウェアアクセスできるようにします。このクラス継承できません。

InputPanel.InputMethodCollection データ型公開されるメンバを以下の表に示します


パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Collections.ICollection.CopyTo このメンバ説明については、ICollection.CopyTo のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Add このメンバ説明については、IList.Add のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Clear このメンバ説明については、IList.Clear のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Contains このメンバ説明については、IList.Contains のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.IndexOf このメンバ説明については、IList.IndexOf のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Insert このメンバ説明については、IList.Insert のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Remove このメンバ説明については、ArrayList.Remove のトピック参照してください
インターフェイスの明示的な実装 System.Collections.IList.Item このメンバ説明については、IList.Item のトピック参照してください
参照参照

関連項目

InputPanel.InputMethodCollection クラス
Microsoft.WindowsCE.Forms 名前空間

その他の技術情報

InputPanel コンポーネント
方法 : InputPanel コンポーネント使用する



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「InputPanel.InputMethodCollection」の関連用語

InputPanel.InputMethodCollectionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



InputPanel.InputMethodCollectionのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS