Share via


InputPanel.VisibleDesktop-Eigenschaft

Dieser Dokumentation für die Vorschau nur ist und in späteren Versionen geändert. Leere Themen wurden als Platzhalter eingefügt.]

Ruft ein Rectangle-Objekt, das den Bereich darstellt, der nicht durch (SIP) des soft input Panel verdeckt wird.

Namespace:  Microsoft.WindowsCE.Forms
Assembly:  Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)

Syntax

'Declaration
Public ReadOnly Property VisibleDesktop As Rectangle
    Get
'Usage
Dim instance As InputPanel
Dim value As Rectangle

value = instance.VisibleDesktop
public Rectangle VisibleDesktop { get; }
public:
property Rectangle VisibleDesktop {
    Rectangle get ();
}
member VisibleDesktop : Rectangle

Eigenschaftswert

Typ: System.Drawing.Rectangle
Ein Objekt, das den Bereich darstellt, der nicht vom SIP eingenommen wird.

Hinweise

Die VisibleDesktop -Eigenschaft enthält ein Rectangle mit den Abmessungen des Bereichs des Formulars, das nicht vom SIP eingenommen wird.Wenn das SIP aktiviert ist, können Sie neu positionieren oder Größe der Steuerelemente werden in diesem Bereich ändern.Wenn Sie für ein Windows Embedded CEentwickeln - basierten Gerät außer einem Pocket PC die VisibleDesktop-Eigenschaft gibt das größte Rechteck in den Bereich des Formulars, das nicht vom SIP eingenommen wird.Wenn das SIP deaktiviert das Formular ist, gibt VisibleDesktop die Abmessungen des Clientbereichs des Formulars zurück.

Beispiele

Das folgenden Beispiel wird EnabledChanged-Ereignis verwendet, zum Verringern der Höhe eines Steuerelements Registerkarte, wenn das SIP aktiviert ist.Wenn das SIP deaktiviert ist, werden das Registerkarten-Steuerelement an seine ursprüngliche Höhe zurückgegeben.Der Beispiel-untersucht VisibleDesktop-Eigenschaft, wenn das SIP aktiviert und deaktiviert, sodass die Registerkarte Steuerelement Höhe für das SIP angepasst werden kann.In diesem Beispiel ist Teil eines umfangreicheren Beispiels für die InputPanel Komponente bereitgestellt wird.

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-Sicherheit

Plattformen

Windows CE, Windows Mobile für Pocket PC

Die .NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET framework.

Versionsinformationen

.NET Compact Framework

Unterstützt in: 3.5, 2.0, 1.0

Siehe auch

Referenz

InputPanel Klasse

Member InputPanel

Microsoft.WindowsCE.Forms-Namespace