C# Windows フォーム アプリケーションでフォーム サイズを修正し、ユーザーがそのサイズを変更できないようにするにはどうすればよいですか?
120081 次
7 に答える
81
これをチェックして:
// 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();
于 2010-05-26T06:37:59.113 に答える
19
設定してみる
this.MinimumSize = new Size(140, 480);
this.MaximumSize = new Size(140, 480);
于 2012-11-29T11:40:59.147 に答える
12
サイズ変更イベントを防ぐための最小限の設定
form1.FormBorderStyle = FormBorderStyle.FixedDialog;
form1.MaximizeBox = false;
于 2014-01-11T00:51:12.537 に答える
10
プロパティ -> FormBorderStyle -> FixedSingle
プロパティツールが見つからない場合。[表示] -> [プロパティ] ウィンドウに移動します
于 2013-12-23T23:14:29.783 に答える
4
これが最良の方法ではないことは確かですが、 プロパティMinimumSize
とMaximimSize
プロパティを同じ値に設定できます。それはそれを停止します。
于 2010-05-26T06:34:31.650 に答える
0
MaximizeプロパティをFalseに設定します。
于 2016-06-16T08:11:15.690 に答える