InputPanel.VisibleDesktop プロパティ
[このドキュメントはプレビュー版であり、後のリリースで変更されることがあります。 空白のトピックは、プレースホルダーとして挿入されています。]
ソフト入力パネル (SIP) によって隠されていない領域を表す Rectangle オブジェクトを取得します。
名前空間: Microsoft.WindowsCE.Forms
アセンブリ: Microsoft.WindowsCE.Forms (Microsoft.WindowsCE.Forms.dll 内)
構文
'宣言
Public ReadOnly Property VisibleDesktop As Rectangle
Get
'使用
Dim instance As InputPanel
Dim value As Rectangle
value = instance.VisibleDesktop
public Rectangle VisibleDesktop { get; }
public:
property Rectangle VisibleDesktop {
Rectangle get ();
}
member VisibleDesktop : Rectangle
プロパティ値
型 : System.Drawing.Rectangle
SIP によって占有されていない領域を表すオブジェクト。
解説
VisibleDesktop プロパティは、SIP によって占有されていないフォームの領域のサイズを格納した Rectangle を提供します。SIP が有効になったときに、各コントロールの位置やサイズをこの領域に収まるように変更できます。Pocket PC 以外の Windows Embedded CE ベースのデバイス用の開発を行っている場合、VisibleDesktop プロパティは、SIP によって占有されていないフォーム領域の最も大きい四角形を返します。SIP がフォームから消去された場合、VisibleDesktop はフォームのクライアント領域のサイズを返します。
例
EnabledChanged イベントを使用して、SIP が有効になったときにタブ コントロールの高さを低くする例を次に示します。SIP が無効になったら、タブ コントロールを元の高さに戻します。SIP が有効で、無効にして、SIP に対応するタブ コントロールの高さを調整できるように、次の使用例 VisibleDesktop プロパティを調べます。この例は、InputPanel コンポーネントで取り上げている例の一部分です。
PrivateSub InputPanel1_EnabledChanged(ByVal sender AsObject, _
ByVal e As System.EventArgs) Handles InputPanel1.EnabledChanged
If InputPanel1.Enabled = FalseThen
' 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
EndIf
' 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)
EndSub
privatevoid 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);
}
.NET Framework セキュリティ
- 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分的に信頼される側のコードからライブラリの使用」を参照してください。
プラットフォーム
Windows CE, Windows Mobile for Pocket PC
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。 サポートされているバージョンについては、「.NET フレームワークのシステム要件」を参照してください。
バージョン情報
.NET Compact Framework
サポート対象 : 3.5、2.0、1.0