This documentation is archived and is not being maintained.

InputPanel.VisibleDesktop Property

Gets a Rectangle object that represents the area that is not obscured by the soft input panel (SIP).

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

public Rectangle VisibleDesktop { get; }

Property Value

Type: System.Drawing.Rectangle
An object that represents the area that is not occupied by the SIP.

The VisibleDesktop property provides a Rectangle with the dimensions of the area of the form that is not occupied by the SIP. When the SIP is enabled, you can reposition or resize controls to be within this area. If you are developing for a Windows Embedded CE-based device other than a Pocket PC, the VisibleDesktop property returns the largest rectangle in the area of the form that is not occupied by the SIP. If the SIP is off the form, VisibleDesktop returns the dimensions of the client area of the form.

The following example uses the EnabledChanged event to decrease the height of a tab control when the SIP is enabled. It returns the tab control to its original height when the SIP is disabled. The example examines the VisibleDesktop property when the SIP is enabled and disabled so that the tab control height can be adjusted to accommodate the SIP. This example is part of a larger example provided for the InputPanel component.

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;
        // 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

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0