如何禁用用户的表单大小调整?
如何禁用用户的表单大小调整? 哪个属性被使用?
我试过AutoSize和AutoSizeMode 。 
 将FormBorderStyle更改为固定值之一: FixedSingle , Fixed3D , FixedDialog或FixedToolWindow 。 
  FormBorderStyle属性位于“外观”类别下。 
或者检查这个
 // Define the border style of the form to a dialog box. form1.FormBorderStyle = FormBorderStyle.FixedDialog; // Set the MaximizeBox to false to remove the maximize box. form1.MaximizeBox = false; // Set the MinimizeBox to false to remove the minimize box. form1.MinimizeBox = false; // Set the start position of the form to the center of the screen. form1.StartPosition = FormStartPosition.CenterScreen; // Display the form as a modal dialog box. form1.ShowDialog(); 
 使用FormBorderStyle属性,使其成为FixedSingle 
 this.FormBorderStyle = FormBorderStyle.FixedSingle; 
 使用Form FormBorderStyle属性 
 this.FormBorderStyle = FormBorderStyle.FixedDialog; 
 使用窗体的MaximumSize和MinimumSize属性,将修正窗体大小,并防止用户调整窗体大小,同时保持窗体的默认FormBorderStyle 。 
 this.MaximumSize = new Size(XX,YY); this.MinimumSize = new Size(X,Y); 
我会设置最大尺寸,最小尺寸,并删除窗口的抓手图标。
设置属性(MaximumSize,MinimumSize,SizeGripStyle):
 this.MaximumSize = new System.Drawing.Size(500, 550); this.MinimumSize = new System.Drawing.Size(500, 550); this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; 
更改此属性,并尝试在devise时间
FormBorderStyle = FormBorderStyle.FixedDialog;
很老,但对于未来的用户,我总是使用这个:
 // lock form this.MaximumSize = this.Size; this.MinimumSize = this.Size; 
通过这种方式,您可以始终从Designer调整窗体大小而不更改代码。