Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Mono で実行されている C# プログラムから Linux デスクトップの画面解像度を調べるにはどうすればよいですか? 私はUbuntuを使用しています。
コマンドを使用しxrandrて解像度を表示できますが、プログラムで同じ情報を取得する方法はありますか?
xrandr
.NET C# の場合とまったく同じ方法です。それが Mono の全体的な考え方です。基盤となる OS を透過的にするためです。
Google「画面解像度C#」。最初の検索結果は問題なく動作するはずです。
次のコマンドを使用できます。
xdpyinfo | grep 'dimensions:'