ScreenOrientation-Enumeration
Dieser Dokumentation für die Vorschau nur ist und in späteren Versionen geändert. Leere Themen wurden als Platzhalter eingefügt.]
Gibt den Winkel der Ausrichtung des Bildschirms Gerät, auf die von der ScreenOrientation-Eigenschaft zugegriffen werden kann.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in Microsoft.WindowsCE.Forms.dll)
Syntax
'Declaration
Public Enumeration ScreenOrientation
'Usage
Dim instance As ScreenOrientation
public enum ScreenOrientation
public enum class ScreenOrientation
type ScreenOrientation
Member
Membername | Beschreibung | |
---|---|---|
Angle0 | Gibt eine Ausrichtung Hochformat mit 0 Grad. | |
Angle90 | Gibt eine Orientierung auf 90 Grad. | |
Angle180 | Gibt eine Ausrichtung Querformat auf 180 Grad. | |
Angle270 | Gibt eine Orientierung auf 270 Grad. |
Hinweise
Die Standardausrichtung Hochformat ist der Winkel 0.Erfordert Pocket PC 2003-Update.
Beispiele
Im folgenden Codebeispiel wird veranschaulicht wie Mausklicks die Bildschirmausrichtung über ScreenOrientation-Enumeration drehen.Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels für die SystemSettings-Klasse bereitgestellt wird.
' 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.PrivateSub Button1_Click(sender AsObject, e As System.EventArgs) Handles Button1.Click
SelectCase 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 += 1
Case 1
SetOrientation(ScreenOrientation.Angle180)
x += 1
Case 2
SetOrientation(ScreenOrientation.Angle270)
x += 1
Case 3
SetOrientation(ScreenOrientation.Angle0)
x = 0
CaseElse
SetOrientation(ScreenOrientation.Angle0)
x = 0
EndSelectEndSub
' Set the orientation to a value of the' ScreenOrienation enumeration and update the' status bar with the current angle.PrivateSub SetOrientation(so As ScreenOrientation)
' Set the requested orientation.
SystemSettings.ScreenOrientation = so
Me.StatusBar1.Text = SystemSettings.ScreenOrientation.ToString()
EndSub
// 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.privatevoid 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.privatevoid SetOrientation(ScreenOrientation so)
{
// Set the requested orientation.
SystemSettings.ScreenOrientation = so;
this.statusBar1.Text = SystemSettings.ScreenOrientation.ToString();
}
Plattformen
Windows CE, Windows Mobile für Smartphone, Windows Mobile für Pocket PC
Die .NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET framework.
Versionsinformationen
.NET Compact Framework
Unterstützt in: 3.5, 2.0