Export (0) Print
Expand All

SystemSettings.ScreenOrientation Property

Gets or sets the current screen orientation of a device.

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

public static ScreenOrientation ScreenOrientation { 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).

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

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;
this.statusBar1.Text = SystemSettings.ScreenOrientation.ToString();

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.

.NET Compact Framework

Supported in: 3.5, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft