Partager via


SystemSettings.ScreenOrientation, propriété

Mise à jour : novembre 2007

Obtient ou définit l'orientation actuelle de l'écran d'un périphérique.

Espace de noms :  Microsoft.WindowsCE.Forms
Assembly :  Microsoft.WindowsCE.Forms (dans Microsoft.WindowsCE.Forms.dll)

Syntaxe

'Déclaration
Public Shared Property ScreenOrientation As ScreenOrientation
'Utilisation
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);
}
public static function get ScreenOrientation () : ScreenOrientation
public static function set ScreenOrientation (value : ScreenOrientation)

Valeur de propriété

Type : Microsoft.WindowsCE.Forms.ScreenOrientation

Une des valeurs d'énumération, qui sont 0, 90, 180 et 270. La valeur par défaut est 0 (mode portrait).

Notes

Vous pouvez remplacer la valeur (0) de l'orientation en mode portrait par 90, 180 ou 270 sans réinitialiser le périphérique.

Exemples

L'exemple suivant affecte la valeur 0 à cette propriété et affiche la valeur dans une barre d'état. Cet exemple est extrait d'un exemple plus développé fourni pour la classe SystemSettings.

' 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();

Autorisations

Plateformes

Windows CE, Windows Mobile pour Smartphone, Windows Mobile pour Pocket PC

Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Informations de version

.NET Compact Framework

Pris en charge dans : 3.5, 2.0

Voir aussi

Référence

SystemSettings, classe

Membres SystemSettings

Microsoft.WindowsCE.Forms, espace de noms