Share via


InputPanel.Bounds-Eigenschaft

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

Ruft eine Rectangle-Objekt ab, das die Größe und Position des soft input Panel (SIP) darstellt.

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

Syntax

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

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

Eigenschaftswert

Typ: System.Drawing.Rectangle
Ein Objekt, das die Größe und Position von das SIP darstellt.

Hinweise

Die Bounds-Eigenschaft gibt zurück immer eine Breite von 240 Pixeln und eine Höhe von 80 Pixeln für Pocket PCs, unabhängig davon, ob das SIP aktiviert ist.

Hinweis

Einige Pocket PC-Geräte geben eine Höhe größer als 80 Pixeln für das SIP zurück.Verwenden Sie die Bounds-Eigenschaft, um die Höhe bestimmen.

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.Im Beispiel wird die Bounds-Eigenschaft verwendet, um die Größe und Speicherort für das SIP angezeigt.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

VisibleDesktop