根据问题的建议,我是否应该检查矩形以根据以下内容设置Form.Location(取自设置文件):
1.
if (settings.X < Screen.PrimaryScreen.WorkingArea...)
{
// Set the form's Location based on the settings object
}
2.
int width = 0;
foreach (Screen screen in Screen.AllScreens)
{
width += screen.WorkingArea.Width;
}
if (settings.X < width...)
{
// Set the form's Location based on the settings object
}
还是有一个简单的单行程序可以完成#2的任务?我正在使用双监视器,但用户群可能有任意数量的配置。