使用されていません。クライアント座標におけるペン入力パネルの高さを取得します。PenInputPanel は Microsoft.Ink.TextInput に置き換えられました。
名前空間 : Microsoft.Ink
アセンブリ : Microsoft.Ink (Microsoft.Ink.dll 内)
構文
'宣言
Public ReadOnly Property Height As Integer
'使用
Dim instance As PenInputPanel
Dim value As Integer
value = instance.Height
public int Height { get; }
public:
property int Height {
int get ();
}
/** @property */
public int get_Height()
public function get Height () : int
プロパティ値
型 : System.Int32
クライアント座標におけるペン入力パネルの高さ。
値 |
説明 |
---|---|
120 |
96 ドット/インチ (dpi) での 1.25 インチに等しいピクセル数。 |
150 |
120 dpi での 1.25 インチに等しいピクセル数。 |
166 |
133 dpi での 1.25 インチに等しいピクセル数。 |
解説
ペン入力パネルの高さは、特定の Tablet PC の画面解像度に依存しています。
Microsoft® Windows® XP Tablet PC Edition 2005 では、Tablet PC 入力パネルを使用すると、入力パネルのサイズを自動的に大きくして新しい手書き文字に合わせることにより、ユーザーが手書き文字の入力を継続することが可能になります。Height プロパティおよび Width プロパティは、入力パネルが大きくなっても新しいサイズを反映するために更新されません。これらのプロパティは、入力パネルの元のサイズを返します。また、入力パネルのポイント先の寸法を報告しません。
![]() |
---|
部分信頼で使用している場合、このプロパティには PenInputPanel により必要とされるアクセス許可に加えて、SecurityPermissionFlag.AllFlags アクセス許可が必要です。詳細については、「Security and Trust」を参照してください。 |
例
この C# の例では、PenInputPanel オブジェクト thePenInputPanel を作成し、それを InkEdit コントロール inkEdit1 に結合します。次に、VisibleChanged イベント ハンドラ VisibleChanged_Event を結合します。イベント ハンドラでは、PenInputPanel が結合されたエディット コントロールのコンテンツに文を追加します。この文は、Height プロパティを取得して、ToString メソッドでそれを文字列に変換することにより、ペン入力パネルの高さをピクセル単位で示します。
[C#]
//...
// Declare the PenInputPanel object
PenInputPanel thePenInputPanel;
public Form1()
{
// Required for Windows Form Designer support
InitializeComponent();
// Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = new PenInputPanel(inkEdit1);
// Add a VisibleChanged event handler
thePenInputPanel.VisibleChanged +=
new PenInputPanelVisibleChangedEventHandler(VisibleChanged_Event);
}
//...
public void VisibleChanged_Event(object sender,
PenInputPanelVisibleChangedEventArgs e)
{
// Make sure the object that generated
// the event is a PenInputPanel object
if (sender is PenInputPanel)
{
PenInputPanel theSenderPanel = (PenInputPanel)sender;
// When the panel has become visible...
if (e.NewVisibility)
{
// Display the height of the panel in the attached edit control
theSenderPanel.AttachedEditControl.Text +=
"The height of the panel is ";
theSenderPanel.AttachedEditControl.Text +=
theSenderPanel.Height.ToString();
theSenderPanel.AttachedEditControl.Text += " pixels.\n";
}
}
}
この Microsoft Visual Basic® .NET の例では、PenInputPanel オブジェクト thePenInputPanel を作成し、それを InkEdit コントロール InkEdit1 に結合します。次に、VisibleChanged イベント ハンドラ VisibleChanged_Event を結合します。イベント ハンドラでは、PenInputPanel が結合されたエディット コントロールのコンテンツに文を追加します。この文は、Height プロパティを取得して、ToStringメソッドでそれを文字列に変換することにより、ペン入力パネルの高さをピクセル単位で示します。
[Visual Basic]
'...
' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel
Public Sub New()
MyBase.New()
' Required for Windows Form Designer support
InitializeComponent()
' Create and attach the new PenInputPanel to an InkEdit control.
thePenInputPanel = New PenInputPanel(InkEdit1)
' Add a VisibleChanged event handler
AddHandler thePenInputPanel.VisibleChanged, _
AddressOf VisibleChanged_Event
End Sub 'New
'...
Public Sub VisibleChanged_Event(sender As Object, e As _
PenInputPanelVisibleChangedEventArgs)
' Make sure the object that generated
' the event is a PenInputPanel object
If TypeOf sender Is PenInputPanel Then
Dim theSenderPanel As PenInputPanel = CType(sender, PenInputPanel)
' When the panel has become visible...
If e.NewVisibility Then
' Display the height of the panel in the attached edit control
theSenderPanel.AttachedEditControl.Text += _
"The height of the panel is "
theSenderPanel.AttachedEditControl.Text += _
theSenderPanel.Height.ToString()
theSenderPanel.AttachedEditControl.Text += " pixels." + ControlChars.Lf
End If
End If
End Sub 'VisibleChanged_Event
プラットフォーム
Windows Vista
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 3.0