winform自动最大化(在不同分辨率情况下)

load函数末尾加:

System.Drawing.Rectangle rec = Screen.GetWorkingArea(this);

            int SH = rec.Height;

            int SW = rec.Width;
            this.Width = SW;
            this.Height = SH;