的WinForms - 调整大小事件后的行动 [英] WinForms - action after resize event

查看:218
本文介绍了的WinForms - 调整大小事件后的行动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有可能 resize事件(用户控制),例如当松开鼠标按钮后,执行特定操作吗?我需要手动调整的内部控制和对事件的每一个发射做这将是非常,嗯,效率低下......

Is it possible to perform a specific action after the resize event (of the user control), for example when mouse button is released? I need to manually resize an inner control and doing it on every single firing of the event would be quite, hmm, inefficient...

推荐答案

只需使用<一个href="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.resizeend.aspx"><$c$c>ResizeEnd事件:

Just use the ResizeEnd event:

private void Form1_ResizeEnd(object sender, EventArgs e)
{
   // Your code here
}

从MSDN:

From MSDN:

该ResizeEnd事件触发时的   用户结束调整大小的一种形式,   通常通过拖动的所述一个   边界或大小调整手柄位于   形式的右下角,   然后释放它。欲了解更多   关于大小调整信息   操作。

The ResizeEnd event is raised when the user finishes resizing a form, typically by dragging one of the borders or the sizing grip located on the lower-right corner of the form, and then releasing it. For more information about the resizing operation.

这篇关于的WinForms - 调整大小事件后的行动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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