본문 바로가기
C#

현재 pc의 실행중인 모니터에 대한 정보를 가져오기

by 캡틴노랑이 2016. 8. 2.
반응형
현재 사용중인 PC의 모니터의 정보를 조회한다. 해상도, 주모니터 여부 등등을 알 수 있다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Screen.AllScreens;
 
for (int index = 0; index < Screen.AllScreens.Length; index++)
{
    var screen = Screen.AllScreens[index];
    Console.WriteLine("Name: {0}", screen.DeviceName);
    Console.WriteLine("Bounds: {0}", screen.Bounds);
    Console.WriteLine("Working Area: {0}", screen.WorkingArea);
    Console.WriteLine("Primary Screen: {0}", screen.Primary);
    Console.WriteLine("Type: {0}", screen.GetType());
}
 
 
참고 자료
http://stackoverflow.com/questions/1538602/find-number-and-resolution-to-all-monitors
반응형

댓글