ScreenOrientationとは? わかりやすく解説

ScreenOrientation 列挙体

ScreenOrientation プロパティによってアクセスできるデバイス画面向き角度指定します

名前空間: Microsoft.WindowsCE.Forms
アセンブリ: Microsoft.WindowsCE.Forms (microsoft.windowsce.forms.dll 内)
構文構文

Dim instance As ScreenOrientation
public enum ScreenOrientation
public enum class ScreenOrientation
public enum ScreenOrientation
public enum ScreenOrientation
メンバメンバ
 メンバ説明
.NET Compact Framework によるサポートAngle0向き (角度 0 度) を指定します。 
.NET Compact Framework によるサポートAngle180横向き (角度 180 度) を指定します。 
.NET Compact Framework によるサポートAngle270向き270 度に指定します。  
.NET Compact Framework によるサポートAngle90向き90 度に指定します。 
解説解説

向き既定角度は 0 度です。Pocket PC 2003更新が必要です。

使用例使用例

ScreenOrientation 列挙体を使用してボタンクリックしたときに画面向き回転させる方法次のコード例示します。このコード例は、SystemSettings クラストピック取り上げているコード例一部分です。

' 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 Sub Button1_Click(sender As
 Object, e As System.EventArgs) Handles
 Button1.Click
   
   Select Case 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
      Case Else
         SetOrientation(ScreenOrientation.Angle0)
         x = 0
   End Select
End Sub


' Set the orientation to a value of the
' ScreenOrienation enumeration and update the
' status bar with the current angle.
Private Sub SetOrientation(so As
 ScreenOrientation)
   ' Set the requested orientation.
   SystemSettings.ScreenOrientation = so
   
   Me.StatusBar1.Text = SystemSettings.ScreenOrientation.ToString()
End Sub
 // 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();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Microsoft.WindowsCE.Forms 名前空間

ScreenOrientation 列挙体




英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ScreenOrientation」の関連用語

ScreenOrientationのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ScreenOrientationのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS