Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 2.0
 ScreenOrientation Property

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
.NET Framework Class Library
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)

Visual Basic (Declaration)
Public Shared Property ScreenOrientation As ScreenOrientation
Visual Basic (Usage)
Dim value As ScreenOrientation

value = SystemSettings.ScreenOrientation

SystemSettings.ScreenOrientation = value
C#
public static ScreenOrientation ScreenOrientation { get; set; }
C++
public:
static property ScreenOrientation ScreenOrientation {
    ScreenOrientation get ();
    void set (ScreenOrientation value);
}
J#
/** @property */
public static ScreenOrientation get_ScreenOrientation ()

/** @property */
public static void set_ScreenOrientation (ScreenOrientation value)
JScript
public static function get ScreenOrientation () : ScreenOrientation

public static function set ScreenOrientation (value : ScreenOrientation)

Property Value

One of the ScreenOrientation values, which are 0, 90, 180, and 270. The default is 0.

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

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

Visual Basic
' Set the screen orientation to normal
' and display the value on the status bar.
SystemSettings.ScreenOrientation = ScreenOrientation.Angle0
Me.StatusBar1.Text = SystemSettings.ScreenOrientation.ToString()
C#
// Set the screen orientation to normal
// and display the value on the status bar.
SystemSettings.ScreenOrientation = ScreenOrientation.Angle0;
this.statusBar1.Text = SystemSettings.ScreenOrientation.ToString();
  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

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

.NET Compact Framework

Supported in: 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker