将winform定位在屏幕的左下角

use*_*618 12 .net c# windows winforms

我试图将一个表单放在屏幕的左下角(在开始按钮上)我有以下代码试图这样做,但只考虑屏幕的工作区域 - 所以表单定位在开始按钮上方:

int x = Screen.PrimaryScreen.WorkingArea.Left + this.Width;
int y = Screen.PrimaryScreen.WorkingArea.Bottom - this.Height;
this.Location = new Point(x, y);
Run Code Online (Sandbox Code Playgroud)

下面是一个演示/屏幕,以进一步展示我想要做的事情:

[演示屏幕](http://i.stack.imgur.com/9mTjj.png)

Ria*_*Ria 11

使用Screen.PrimaryScreen.Bounds属性和设置this.TopMost = true.这工作:

int y = Screen.PrimaryScreen.Bounds.Bottom - this.Height;
this.Location = new Point(0, y);
this.TopMost = true;
Run Code Online (Sandbox Code Playgroud)