Dieser Artikel wurde noch nicht bewertet - Dieses Thema bewerten.

ScreenOrientation-Enumeration

Gibt den Ausrichtungswinkel des Gerätebildschirms an, auf den die ScreenOrientation-Eigenschaft zugreifen kann.

Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)

public enum ScreenOrientation
public enum ScreenOrientation
public enum ScreenOrientation
 MembernameBeschreibung
Unterstützt von .NET Compact FrameworkAngle0Gibt das Hochformat an (Drehung um 0 (null) Grad). 
Unterstützt von .NET Compact FrameworkAngle180Gibt eine Drehung von 180 Grad in das Querformat an. 
Unterstützt von .NET Compact FrameworkAngle270Gibt eine Drehung von 270 Grad an.  
Unterstützt von .NET Compact FrameworkAngle90Gibt eine Drehung von 90 Grad an. 

Das Standardhochformat ist um 0 (null) Grad gedreht. Eine Pocket PC 2003-Aktualisierung ist erforderlich.

Im folgenden Codebeispiel wird veranschaulicht, wie durch Klicken auf eine Schaltfläche die Bildschirmausrichtung über die ScreenOrientation-Enumeration gedreht werden kann. Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels für die SystemSettings-Klasse.


 // Each click event changes the screen orientation, as determined
 // by the variable x, which increments from 0 to 3 and then back
 // to 0. Four clicks cycle through the ScreenOrientation enumeration.

private void button1_Click(object sender, System.EventArgs e)
{

 switch(x)
 {
  case 0:

   // Pass a value for the ScreenOrientation enumeration
   // to the SetOrientation method, defined below,
   // and increment x so that the next button
   // click rotates the screen orientation.
   SetOrientation(ScreenOrientation.Angle90);
   x++;
   break;
  case 1:
   SetOrientation(ScreenOrientation.Angle180);
   x++;
   break;
  case 2:
   SetOrientation(ScreenOrientation.Angle270);
   x++;
   break;
  case 3:
   SetOrientation(ScreenOrientation.Angle0);
   x = 0;
   break;
  default:
   SetOrientation(ScreenOrientation.Angle0);
   x = 0;
   break;
 }
}

 // Set the orientation to a value of the
 // ScreenOrienation enumeration and update the
 // status bar with the current angle.
private void SetOrientation(ScreenOrientation so)
{
 // Set the requested orientation.

 SystemSettings.ScreenOrientation = so;

 this.statusBar1.Text = SystemSettings.ScreenOrientation.ToString();
}

Windows CE, Windows Mobile für Pocket PC, Windows Mobile für Smartphone

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

.NET Compact Framework

Unterstützt in: 2.0
Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)
Microsoft führt eine Onlineumfrage durch, um Ihre Meinung zur MSDN-Website zu erfahren. Wenn Sie sich zur Teilnahme entscheiden, wird Ihnen die Onlineumfrage angezeigt, sobald Sie die MSDN-Website verlassen.

Möchten Sie an der Umfrage teilnehmen?
© 2013 Microsoft. Alle Rechte vorbehalten.