Form.ResizeEnd 事件

定义

窗体退出大小调整模式时发生。Occurs when a form exits resizing mode.

public:
 event EventHandler ^ ResizeEnd;
public event EventHandler ResizeEnd;
member this.ResizeEnd : EventHandler 
Public Custom Event ResizeEnd As EventHandler 

示例

下面的示例演示如何使用此成员。The following example demonstrates the use of this member. 在此示例中,事件处理程序报告 ResizeEnd 事件的发生。In the example, an event handler reports on the occurrence of the ResizeEnd event. 此报表可帮助你了解何时发生事件,并可帮助你进行调试。This report helps you to learn when the event occurs and can assist you in debugging. 若要报告多个事件或频繁发生的事件,请考虑将 MessageBox.Show 替换为 Console.WriteLine 或将消息附加到多行 TextBox中。To report on multiple events or on events that occur frequently, consider replacing MessageBox.Show with Console.WriteLine or appending the message to a multiline TextBox.

若要运行示例代码,请将其粘贴到包含名为 Form1Form 类型实例的项目中。To run the example code, paste it into a project that contains an instance of type Form named Form1. 然后,确保事件处理程序与 ResizeEnd 事件关联。Then ensure that the event handler is associated with the ResizeEnd event.

private void Form1_ResizeEnd(Object sender, EventArgs e) {

   MessageBox.Show("You are in the Form.ResizeEnd event.");

}
Private Sub Form1_ResizeEnd(sender as Object, e as EventArgs) _ 
     Handles Form1.ResizeEnd

   MessageBox.Show("You are in the Form.ResizeEnd event.")

End Sub

注解

用户完成调整窗体的大小时,通常会通过拖动窗体右下角的一个边框或大小调整手柄,然后将其发布,来引发 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. 有关调整大小操作的详细信息,请参阅 ResizeBegin 事件。For more information about the resizing operation, see the ResizeBegin event.

在用户移动窗体后(通常通过单击和拖动标题栏),也会生成 ResizeEnd 事件。The ResizeEnd event is also generated after the user moves a form, typically by clicking and dragging on the caption bar. 此事件不是通过编程方式操作(例如,通过更改 SizeLocation 属性)生成的。This event is not generated by programmatic manipulation of the form, for example by changing the Size or Location properties.

有关处理事件的详细信息,请参阅处理和引发事件For more information about handling events, see Handling and Raising Events.

适用于

另请参阅