int y = Screen.PrimaryScreen.WorkingArea.Width;
int x = this.Size.Width;
if (x > y)
{
x = 0;
}
else
{
x = y - x;
}
Point p = new Point(x, 0);
this.Location = p;
设置窗口坐标就可以了
Screen用于获取用户桌面信息,可以根据此然后使用PointToScreen来确定定位点