C# winform整个框体根据屏幕居中

来源:互联网 发布:软件开发团队分工 编辑:程序博客网 时间:2024/05/08 14:10
public  void SetMid()        {            this.SetBounds((Screen.GetBounds(this).Width / 2) - this.Width / 2, (Screen.GetBounds(this).Height / 2) - (this.Height / 2), this.Width, this.Height, BoundsSpecified.Location);        }

0 0