修复C#Windows窗体中的表单大小 [英] Fix Form Size in C# Windows Form
问题描述
如何在C#中设置固定表单大小?如果我在中心运行申请表怎么办?
你的意思是你不想要一个相当大的窗口?如果是这种情况,请使用例如<$ h $ = http://msdn.microsoft.com/en-us/library/system.windows.forms的FixedSingle
。 form.formborderstyle.aspx> FormBorderStyle [ ^ ]
要使窗口居中,可以使用 StartPosition [ ^ ]
如果你将表格的formborderstyle设置为fixeddialog,那么表单不够大。
你也可以设置表单开始位置,使其在整个屏幕中心或只是应用程序的中心。
只需点击表格并检查使用属性检查器的表单属性。
How to set Fixed Form Size in C#? And If I Run The Application form in Center How to do? 这篇关于修复C#Windows窗体中的表单大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
You mean you don't want a sizable window? If that's the case, use for example
FixedSingle
for FormBorderStyle[^]
To center the window, you can use StartPosition[^]If you set the form's formborderstyle to fixeddialog, then the form is not sizeable.
Yyou can also set the form startposition to make it center the entire screen or just center towards the application.
Just click the form and inspect the properties of the form using the property inspector.Right click on your form and go to properties.Then go to Layout options,see there are a property named Size.Change it as your need as width and length wise.Also see a property named StartPosition just after the Size property.Select it as CentreScreen..it will start your form from center of your screen.You can also change these two properties by coding during form load.Use best one according to your requirement..