Partager via


SystemSettings.ScreenOrientation Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the current screen orientation of a device.

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

Syntax

'Declaration
Public Shared Property ScreenOrientation As ScreenOrientation
    Get
    Set
'Usage
Dim value As ScreenOrientation

value = SystemSettings.ScreenOrientation

SystemSettings.ScreenOrientation = value
public static ScreenOrientation ScreenOrientation { get; set; }
public:
static property ScreenOrientation ScreenOrientation {
    ScreenOrientation get ();
    void set (ScreenOrientation value);
}
static member ScreenOrientation : ScreenOrientation with get, set

Property Value

Type: Microsoft.WindowsCE.Forms.ScreenOrientation
One of the enumeration values, which are 0, 90, 180, and 270. The default is 0 (portrait view).

Remarks

You can change the portrait orientation value (0) to 90, 180, or 270 without resetting the device.

Examples

The following example sets the value of this property to 0 and displays the value on the status bar. This example is part of a larger example that is provided for the SystemSettings class.

' Set the screen orientation to normal
' and display the value on the status bar.
SystemSettings.ScreenOrientation = ScreenOrientation.Angle0
Me.StatusBar1.Text = SystemSettings.ScreenOrientation.ToString()
// Set the screen orientation to normal
// and display the value on the status bar.
SystemSettings.ScreenOrientation = ScreenOrientation.Angle0;
this.statusBar1.Text = SystemSettings.ScreenOrientation.ToString();

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, 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.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

SystemSettings Class

SystemSettings Members

Microsoft.WindowsCE.Forms Namespace