//根据屏幕大小设置窗体初始大小
//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);