如何在 C# Windows 窗体应用程序中修复窗体大小而不让用户更改其大小?
最佳答案
检查这个:
// 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();
关于c# - 如何修复 C# Windows 窗体应用程序中的窗体大小而不让用户更改其大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2910537/