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

InputPanel イベント


InputPanel クラス

Pocket PC やその他の Windows CE .NET デバイス上でデータを入力するためのソフト入力パネル (SIP) を制御します。

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

Public Class InputPanel
    Inherits Component
public class InputPanel : Component
public class InputPanel extends Component
public class InputPanel extends
 Component
解説解説

.NET Compact Framework には、InputPanel コンポーネントが用意されています。これは、Windows CE で SIP を制御するためのマネージ実装を提供します。Pocket PC プラットフォームを対象とした Windows ベースのアプリケーションを作成する場合、Visual Studio では、MainMenu コンポーネントがプロジェクトの Form1 ファイルに自動的に追加されます。それにより、フォームには SIP アイコンを含む下位メニュー バーが配置されます。SIP を使用するためにプログラミングは必要ありません。ユーザーはアイコンをタップして SIP の表示と非表示を切り替えることができます。SIP をプログラミングするには、InputPanel コンポーネントを ToolBox からフォームにドラッグします。

プログラミングでは、Enabled プロパティを使用して SIP を表示したり、Bounds プロパティを使用して SIP のサイズを取得したり、VisibleDesktop プロパティを使用して SIP で占有されていないフォーム領域のサイズを確認したりできます。Bounds プロパティは、SIP が有効になっているかどうかに関係なく、Pocket PC に対しては常に 240 (幅) × 80 (高さ) ピクセルを返します。ユーザーの操作によるかプログラミングによるかを問わず、SIP が有効または無効になると EnabledChanged イベントが発生します。SIP のプログラミングを利用する一般的な例として、SIP が有効か無効かに応じてフォーム上のコントロールの位置やサイズを変更できます。

使用例使用例

次のコード例には、タブ コントロールのページ上にあるテキスト ボックスが含まれています。テキスト ボックスにフォーカスが移動すると SIP が表示されます。EnabledChanged イベントを使用して、SIP が有効になるとタブ コントロールの高さを低くし、SIP が無効になると元の高さに戻します。

Microsoft.WindowsCE.Forms への参照をプロジェクトに追加する必要があることに注意してください。

Private Sub TextBox1_GotFocus(ByVal
 sender As Object, _
    ByVal e As System.EventArgs) Handles
 TextBox1.GotFocus
 ' Display the SIP.
 ' Note that the EnabledChanged event occurs
 ' whenever the SIP is enabled or disabled.
 InputPanel1.Enabled = True
End Sub
Private Sub InputPanel1_EnabledChanged(ByVal
 sender As Object, _
    ByVal e As System.EventArgs) Handles
 InputPanel1.EnabledChanged
 If InputPanel1.Enabled = False Then

  ' The SIP is disabled, so set the height of the tab control
  ' to its original height with a variable (TabOriginalHeight),
  ' which is determined during initialization of the form.
  VisibleRect = InputPanel1.VisibleDesktop
  TabControl1.Height = TabOriginalHeight
 Else
  ' The SIP is enabled, so the height of the tab control
  ' is set to the height of the visible desktop area.
  VisibleRect = InputPanel1.VisibleDesktop
  TabControl1.Height = VisibleRect.Height
 End If

 ' The Bounds property always returns a width of 240 and a height of
 80
 ' pixels for Pocket PCs, regardless of whether or not the SIP is enabled.
 BoundsRect = InputPanel1.Bounds

 ' Show the VisibleDesktop and Bounds values
 ' on the second tab for demonstration purposes.
       VisibleInfo.Text = String.Format("VisibleDesktop:
 X = {0}, " _
       & "Y = {1}, Width = {2}, Height = {3}",
 _
       VisibleRect.X, VisibleRect.Y, _
       VisibleRect.Width, VisibleRect.Height)
       BoundsInfo.Text = String.Format("Bounds:
 X = {0}, Y = {1}," _
          & "Width = {2}, Height = {3}", BoundsRect.X,
 BoundsRect.Y, _
          BoundsRect.Width, BoundsRect.Height)
End Sub
private void textBox1_GotFocus(object sender,
 System.EventArgs e)
{
    // Display the SIP.
    // Note that the EnabledChanged event occurs
    // whenever the SIP is enabled or disabled.
    inputPanel1.Enabled = true;

}
private void inputPanel1_EnabledChanged(object
 sender, EventArgs e)
{
    if (inputPanel1.Enabled == false)
    {
        // The SIP is disabled, so set the height of the tab control
        // to its original height with a variable (TabOriginalHeight)
,
        // which is determined during initialization of the form.
        VisibleRect = inputPanel1.VisibleDesktop;
        tabControl1.Height = TabOriginalHeight;
    }
    else
    {
        // The SIP is enabled, so the height of the tab control
        // is set to the height of the visible desktop area.
        VisibleRect = inputPanel1.VisibleDesktop;
        tabControl1.Height = VisibleRect.Height;
    }

    // The Bounds property always returns a width of 240 and a height
 of 80
    // pixels for Pocket PCs, regardless of whether or not the SIP is
 enabled.
    BoundsRect = inputPanel1.Bounds;

    // Show the VisibleDestkop and Bounds values
    // on the second tab for demonstration purposes.
    VisibleInfo.Text = String.Format("VisibleDesktop: X = {0}, " +
        "Y = {1}, Width = {2}, Height = {3}", VisibleRect.X,
        VisibleRect.Y, VisibleRect.Width, VisibleRect.Height);
    BoundsInfo.Text = String.Format("Bounds: X = {0}, Y = {1}, " +
        "Width = {2}, Height = {3}", BoundsRect.X, BoundsRect.Y,
        BoundsRect.Width, BoundsRect.Height);
}
継承階層継承階層
System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
      Microsoft.WindowsCE.Forms.InputPanel
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
InputPanel メンバ
Microsoft.WindowsCE.Forms 名前空間

InputPanel コンストラクタ

ソフト入力パネル (SIP) を有効または無効にするための InputPanel クラスの新しいインスタンスを初期化します。

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

public InputPanel ()
public:
InputPanel ()
public InputPanel ()
解説解説
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
InputPanel クラス
InputPanel メンバ
Microsoft.WindowsCE.Forms 名前空間

InputPanel プロパティ


InputPanel メソッド


InputPanel メンバ

Pocket PC やその他の Windows CE .NET デバイス上でデータを入力するためのソフト入力パネル (SIP) を制御します。

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド InputPanel ソフト入力パネル (SIP) を有効または無効にするための InputPanel クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ も参照)
  名前 説明
パブリック プロパティ Site  Component の ISite を取得または設定します。(Component から継承されます。)
パブリック プロパティ VisibleDesktop ソフト入力パネル (SIP) で隠れていない領域を表す Rectangle を取得します。
プロテクト プロパティプロテクト プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
パブリック イベントパブリック イベント
参照参照

関連項目

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



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「InputPanel」の関連用語

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

   

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



InputPanelのページの著作権

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

©2026 GRAS Group, Inc.RSS