Graphics.DpiX プロパティとは? わかりやすく解説

Graphics.DpiX プロパティ

この Graphics平方向の解像度取得します

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

使用例使用例

DpiX プロパティと DpiY プロパティ使用する例を次のメソッド示します。この例は、Windows フォームでの使用意図してデザインされています。この例を実行するには、コードを listBox1 という名前の ListBox含まれているフォーム貼り付けフォームコンストラクタからこのメソッド呼び出します。

Private Sub PopulateListBoxWithGraphicsResolution()
    Dim boxGraphics As Graphics = listBox1.CreateGraphics()
    Dim formGraphics As Graphics = Me.CreateGraphics()

    listBox1.Items.Add("ListBox horizontal resolution: "
 _
        & boxGraphics.DpiX)
    listBox1.Items.Add("ListBox vertical resolution: "
 _
        & boxGraphics.DpiY)

    boxGraphics.Dispose()
End Sub
private void PopulateListBoxWithGraphicsResolution()
{
    Graphics boxGraphics = listBox1.CreateGraphics();
    Graphics formGraphics = this.CreateGraphics();

    listBox1.Items.Add("ListBox horizontal resolution: " 
        + boxGraphics.DpiX);
    listBox1.Items.Add("ListBox vertical resolution: " 
        + boxGraphics.DpiY);

    boxGraphics.Dispose();
}
private:
   void PopulateListBoxWithGraphicsResolution()
   {
      Graphics^ boxGraphics = listBox1->CreateGraphics();

      // Graphics* formGraphics = this->CreateGraphics();
      listBox1->Items->Add( String::Format( "ListBox horizontal resolution:
 {0}", boxGraphics->DpiX ) );
      listBox1->Items->Add( String::Format( "ListBox vertical resolution:
 {0}", boxGraphics->DpiY ) );
      delete boxGraphics;
   }
private void PopulateListBoxWithGraphicsResolution()
{
    Graphics boxGraphics = listBox1.CreateGraphics();
    Graphics formGraphics = this.CreateGraphics();

    listBox1.get_Items().Add(("ListBox horizontal resolution: " 
        + boxGraphics.get_DpiX()));
    listBox1.get_Items().Add(("ListBox vertical resolution: " 
        + boxGraphics.get_DpiY()));
    boxGraphics.Dispose();
} //PopulateListBoxWithGraphicsResolution
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

Graphics.DpiX プロパティのお隣キーワード
検索ランキング

   

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



Graphics.DpiX プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS