1、设置窗体的最大尺寸MaxinumSize属性:
this.MaxinumSize = new System.Drawing.Size(
System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width, System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height)
或
2、设置窗体最大化的尺寸MaximizedBounds 属性:
this.MaximizedBounds = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea
本文来自博客园,作者:董锡振,转载请注明原文链接:https://www.cnblogs.com/dongxizhen/p/17484083.html