C#WinForm中如何修改窗体显示的位置?

我知道在窗体的属性中StartPosition属性是确定窗体位置的,但是就那么几种位置!可是我想实现窗体在右下角显示,这该怎么实现?没这个选项啊,有知道的帮帮忙,先谢谢了~

将屏幕工作区域大小减去你的窗体大小就好了啊
private void Form1_Load(object sender, EventArgs e)
{
this.Location = new Point(
Screen.PrimaryScreen.WorkingArea.Width - this.Size.Width, //屏幕工作区域减去窗体宽度
Screen.PrimaryScreen.WorkingArea.Width - this.Size.Height); //屏幕工作区域减去窗体高度
}
注意不要使用Screen.PrimaryScreen.Bounds.Width 因为任务栏会遮挡住也会占用屏幕区域。
温馨提示:内容为网友见解,仅供参考
第1个回答  2012-07-09
private void Form1_Load(object sender, EventArgs e)
{
this.Location = new Point(Screen.PrimaryScreen.Bounds.Width-400, Screen.PrimaryScreen.Bounds.Height-400);
}
第2个回答  2012-07-09
你好!
winform每个窗体都可以自定义位置的,通过StartPosition的Manual属性,即通过location位移来确定窗体的起始位置。不可能直接一个属性就让你在右下角显示的,这个要自己去算。本回答被网友采纳
第3个回答  2012-07-09
恶补的
第4个回答  2012-07-09
楼上正常, 自己算一下就是了.
相似回答