//根據屏幕大小設置窗體初始大小
//Rectangle rect = System.Windows.Forms.SystemInformation.VirtualScreen;
Rectangle rect = SystemInformation.WorkingArea;
this.Height = rect.Height;
this.Width = rect.Width;
//根據屏幕大小設置窗體最大化大小
this.MaximizedBounds = new Rectangle(rect.X, rect.Y, rect.Width - 2, rect.Height - 2);