.NET Framework

Screen 정보 가져오기

Cody Lee 2020. 9. 14. 17:40

DISPLAY1 이라는 이름의 스크린 정보 가져오기

Screen ss =  (from A in Screen.AllScreens where A.DeviceName.Equals(@"\\.\DISPLAY1") select A).FirstOrDefault();
if (ss != null) 
{ 
    this.Top = ss.Bounds.Top; 
    this.Left = ss.Bounds.Left; 
    this.Width = ss.Bounds.Width; 
    this.Height = ss.Bounds.Height; 
}