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

Screen クラス

1 つシステム上の 1 つ上のディスプレイ デバイス表します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説
使用例使用例

Screen クラスさまざまなメソッドおよびプロパティ使用する方法次のコード例示します。この例では AllScreens プロパティ呼び出してシステム接続しているすべての画面配列取得します返される Screen ごとに、デバイス名、範囲、型、作業領域、およびプライマリ画面ListBox追加します

Private Sub Button1_Click(ByVal
 sender As System.Object, ByVal e As
 System.EventArgs) Handles BtnGetScreenInfo.Click

    Dim Index As Integer
    Dim UpperBound As Integer

    ' Gets an array of all the screens connected to the system.

    Dim Screens() As System.Windows.Forms.Screen
 = _
        System.Windows.Forms.Screen.AllScreens
    UpperBound = Screens.GetUpperBound(0)

    For Index = 0 To UpperBound

        ' For each screen, add the screen properties to a list box.

        ListBox1.Items.Add("Device Name: " + Screens(Index).DeviceName)
        ListBox1.Items.Add("Bounds: " + Screens(Index).Bounds.ToString())
        ListBox1.Items.Add("Type: " + Screens(Index).GetType().ToString())
        ListBox1.Items.Add("Working Area: " + Screens(Index).WorkingArea.ToString())
        ListBox1.Items.Add("Primary Screen: " + Screens(Index).Primary.ToString())

    Next



End Sub

private void button1_Click(object sender, System.EventArgs
 e)
{
    int index;
    int upperBound; 

    // Gets an array of all the screens connected to the system.

    Screen [] screens = Screen.AllScreens;
    upperBound = screens.GetUpperBound(0);

    for(index = 0; index <= upperBound; index++)
    {

        // For each screen, add the screen properties to a list box.

        listBox1.Items.Add("Device Name: " + screens[index].DeviceName);
        listBox1.Items.Add("Bounds: " + screens[index].Bounds.ToString());
        listBox1.Items.Add("Type: " + screens[index].GetType().ToString());
        listBox1.Items.Add("Working Area: " + screens[index].WorkingArea.ToString());
        listBox1.Items.Add("Primary Screen: " + screens[index].Primary.ToString());

    }

}
private:
   void button1_Click( Object^ /*sender*/, System::EventArgs^
 /*e*/ )
   {
      int index;
      int upperBound;

      // Gets an array of all the screens connected to the system.
      array<Screen^>^screens = Screen::AllScreens;
      upperBound = screens->GetUpperBound( 0 );
      for ( index = 0; index <= upperBound; index++ )
      {
         // For each screen, add the screen properties to a list box.
         listBox1->Items->Add( String::Concat( "Device Name: ", screens[
 index ]->DeviceName ) );
         listBox1->Items->Add( String::Concat( "Bounds: ", screens[
 index ]->Bounds ) );
         listBox1->Items->Add( String::Concat( "Type: ", screens[
 index ]->GetType() ) );
         listBox1->Items->Add( String::Concat( "Working Area: ",
 screens[ index ]->WorkingArea ) );
         listBox1->Items->Add( String::Concat( "Primary Screen: ",
 screens[ index ]->Primary ) );
      }
   }
private void button1_Click(Object sender, System.EventArgs
 e)
{
    int index;
    int upperBound;
    // Gets an array of all the screens connected to the system.
    Screen screens[] = Screen.get_AllScreens();
    upperBound = screens.GetUpperBound(0);

    for (index = 0; index <= upperBound; index++) {
        // For each screen, add the screen properties to a list box.
        listBox1.get_Items().Add("Device Name: " + screens[index].
            get_DeviceName());
        listBox1.get_Items().Add("Bounds: " + screens[index].get_Bounds()
            .ToString());
        listBox1.get_Items().Add("Type: " + screens[index].GetType().
            ToString());
        listBox1.get_Items().Add("Working Area: " + screens[index].
            get_WorkingArea().ToString());
        listBox1.get_Items().Add("Primary Screen: " + 
            ((System.Boolean)screens[index].get_Primary()).ToString());
    }
} //button1_Click
継承階層継承階層
System.Object
  System.Windows.Forms.Screen
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Screen プロパティ


Screen メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

Screen メンバ

1 つシステム上の 1 つ上のディスプレイ デバイス表します

Screen データ型公開されるメンバを以下の表に示します


パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からScreenを検索した結果を表示しています。
Weblioに収録されているすべての辞書からScreenを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からScreen を検索

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

辞書ショートカット

すべての辞書の索引

「Screen」の関連用語


2
36% |||||

3
36% |||||

4
36% |||||

5
エス‐エー‐アール デジタル大辞泉
36% |||||

6
スプラッシュ画面 デジタル大辞泉
36% |||||

7
ビー‐エス‐オー‐ディー デジタル大辞泉
36% |||||

8
フルスクリーン表示 デジタル大辞泉
36% |||||

9
ユー‐エス‐シー デジタル大辞泉
36% |||||

10
画面キーボード デジタル大辞泉
36% |||||

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

   

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



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

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

©2025 GRAS Group, Inc.RSS