如何轮询窗口来查看连接的显示器以及它们运行的分辨率?
In C#: Screen Class http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx表示单个系统上的一个显示设备或多个显示设备。你想要的Bounds
属性。
foreach(var screen in Screen.AllScreens)
{
// For each screen, add the screen properties to a list box.
listBox1.Items.Add("Device Name: " + screen.DeviceName);
listBox1.Items.Add("Bounds: " + screen.Bounds.ToString());
listBox1.Items.Add("Type: " + screen.GetType().ToString());
listBox1.Items.Add("Working Area: " + screen.WorkingArea.ToString());
listBox1.Items.Add("Primary Screen: " + screen.Primary.ToString());
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)