【发布时间】:2013-07-14 19:55:55
【问题描述】:
我想在 Form_load 事件中调整我的 WinForm 大小。
我写了一行
this.Height -= 100;
在Form_load 事件中但它不起作用,我该如何实现?
private void FormMain_Load(object sender, EventArgs e)
{
try
{
//somecode
if (m_HideControls)
{
// do some controls visible to false
this.Height -= 100;
}
}
catch (Exception ex)
{
}
}
【问题讨论】:
-
这应该可以,这没有错。发布更多代码
-
您在哪里订阅了表单加载事件?
-
是的,你是对的,这是因为最小尺寸属性:/