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

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

问题描述

可以在调整大小事件(用户控件)之后执行特定动作,例如当鼠标按钮被释放时?我需要手动调整一个内部控件的大小,并且在每次单次触发事件时都会这样做,那么这个效率就是很低的...

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...

推荐答案

只需使用 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天全站免登陆