我如何禁用调整的形式在C#中的WinForms用户 [英] How do I disable form resizing for users in C# Winforms

查看:155
本文介绍了我如何禁用调整的形式在C#中的WinForms用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何禁用调整的形式在C#中的WinForms用户。
所使用的财产?

How do I disable form resizing for users in C# Winforms . which property is used ?

我试图

自动调整大小

AutoSizeMode

任何?帮助

推荐答案

更改 FormBorderStyle 来固定值之一: FixedSingle Fixed3D
FixedDialog FixedToolBar

Change the FormBorderStyle to one of the Fixed values: FixedSingle, Fixed3D, FixedDialog or FixedToolBar.

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();

这篇关于我如何禁用调整的形式在C#中的WinForms用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆