Домой Windows Определение разрешения экрана: Справочник по C#

Определение разрешения экрана: Справочник по C#

419
0


Int32 xmax = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width;
Int32 ymax = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height;
Console.WriteLine("SystemInformation.PrimaryMonitorSizen Width = {0} Height = {1}", xmax, ymax);
xmax = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
ymax = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
Console.WriteLine("System.Windows.Forms.Screen.PrimaryScreen.Boundsn Width = {0} Height = {1}", xmax, ymax);
xmax = System.Windows.Forms.SystemInformation.PrimaryMonitorMaximizedWindowSize.Width;
ymax = System.Windows.Forms.SystemInformation.PrimaryMonitorMaximizedWindowSize.Height;
Console.WriteLine("SystemInformation.PrimaryMonitorMaximizedWindowSizen Width = {0} Height = {1}", xmax, ymax);
Console.ReadKey();


Результаты выполнения программы:

SystemInformation.PrimaryMonitorSize

Width = 1366 Height = 768

System.Windows.Forms.Screen.PrimaryScreen.Bounds

Width = 1366 Height = 768

SystemInformation.PrimaryMonitorMaximizedWindowSize

Width = 1382 Height = 744

Определение разрешения экрана: Справочник по C#

0.00 (0%) 0 votes

ЧИТАТЬ ТАКЖЕ:  Программно выполняем Ctrl+C: Справочник по C#

ОСТАВЬТЕ ОТВЕТ

Пожалуйста, введите ваш комментарий!
пожалуйста, введите ваше имя здесь