C# 取得單一螢幕或多螢幕的解析度 get resolution of a display device or multiple display devices (GOOGLE: C# 取的螢幕數量)
C# 取得單一螢幕或多螢幕的解析度 get resolution of a display device or multiple display devices (GOOGLE: C# 取的螢幕數量)
資料來源: https://ccw1986.blogspot.com/2014/01/c-get-resolution-of-display-device-or.html
Code:
foreach (var screen in System.Windows.Forms.Screen.AllScreens) { Console.WriteLine("Device Name: " + screen.DeviceName);//裝置名稱 Console.WriteLine("Bounds: " + screen.Bounds.ToString());//螢幕解析度 Console.WriteLine("Working Area: " + screen.WorkingArea.ToString());//實際工作區域 }