InputPanel.VisibleDesktop プロパティ
アセンブリ: Microsoft.WindowsCE.Forms (microsoft.windowsce.forms.dll 内)


VisibleDesktop プロパティは、SIP によって占有されていないフォームの領域のサイズを格納した Rectangle を提供します。SIP が有効になったときに、各コントロールの位置やサイズをこの領域に収まるように変更できます。Pocket PC 以外の Windows CE .NET デバイス用の開発を行っている場合、VisibleDesktop プロパティは、SIP によって占有されていないフォーム領域の最も大きい四角形を返します。SIP がフォームから消去された場合、VisibleDesktop はフォームのクライアント領域のサイズを返します。

EnabledChanged イベントを使用して、SIP が有効になるとタブ コントロールの高さを低くし、SIP が無効になるとタブ コントロールを元の高さに戻すコード例を次に示します。この例では、SIP が有効または無効になったときに VisibleDesktop プロパティを調べ、SIP に合わせてタブ コントロールの高さを調整します。このコード例は InputPanel コンポーネントのトピックで取り上げているコード例の一部分です。
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 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); }


Windows CE, Windows Mobile for Pocket PC
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からInputPanel.VisibleDesktop プロパティを検索する場合は、下記のリンクをクリックしてください。

- InputPanel.VisibleDesktop プロパティのページへのリンク