C#中如何设置窗体的StartPosition属性设置为右下角

来源:百度知道 编辑:UC知道 时间:2024/06/13 23:06:12
C#中如何设置窗体的StartPosition属性设置为右下角

startpostion属性不能实现你这功能,要在代码里写,

在构造函数里加下面两句即可:
this.StartPosition = FormStartPosition.Manual;
this.Location = new Point(SystemInformation.WorkingArea.Width - this.Width, SystemInformation.WorkingArea.Height - this.Height);

C#中如何设置窗体的StartPosition属性设置为右下角 ,实话告诉你,用startpostion这个属性是不能够做到这一点的,不过我可以写其他的代码为你实现一下你说的那个功能
在formload事件里写上

int a = Screen.PrimaryScreen.Bounds.Height;
int b =Screen.PrimaryScreen.Bounds.Width;
this.Location = new Point(0,a-this.Height-20);

好像不能实现你说的功能!