积极答复者
窗体 最小化——还原 窗口慢慢变小的 原因

问题
答案
-
你的代码看到了。我稍微修改了一点,效果差不多。你要不试试先,估计是bug。
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace form { public partial class Form1 : Form { public Form1() { InitializeComponent(); max = this.MaximumSize; min = this.MinimumSize; } private Size max, min; protected override void OnDeactivate(EventArgs e) { this.MaximumSize = this.MinimumSize = this.Size; base.OnDeactivate(e); } private void Form1_ResizeEnd(object sender, EventArgs e) { this.MaximumSize = max; this.MinimumSize = min; this.Activate(); } } }
2011 c# mvp China. *George读起来像不像“饺子”?我爱吃饺子,我叫George。- 已标记为答案 数学希望 2011年6月14日 8:23
全部回复
-
-
数学希望,
您好!请问您的问题解决了吗?
如果解决了,请把有用的回答标记为答案,并请您把解决方案分享下。
如果还没解决,请问您用的是vs什么版本?建的是什么类型的工程?
最好是提供一个可以让我们重现问题的步骤或代码。
Lucy
Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
你的代码看到了。我稍微修改了一点,效果差不多。你要不试试先,估计是bug。
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace form { public partial class Form1 : Form { public Form1() { InitializeComponent(); max = this.MaximumSize; min = this.MinimumSize; } private Size max, min; protected override void OnDeactivate(EventArgs e) { this.MaximumSize = this.MinimumSize = this.Size; base.OnDeactivate(e); } private void Form1_ResizeEnd(object sender, EventArgs e) { this.MaximumSize = max; this.MinimumSize = min; this.Activate(); } } }
2011 c# mvp China. *George读起来像不像“饺子”?我爱吃饺子,我叫George。- 已标记为答案 数学希望 2011年6月14日 8:23