PrintPreviewDialog.OnClosing(CancelEventArgs) 方法

定义

引发 Closing 事件。

protected:
 override void OnClosing(System::ComponentModel::CancelEventArgs ^ e);
protected override void OnClosing(System.ComponentModel.CancelEventArgs e);
override this.OnClosing : System.ComponentModel.CancelEventArgs -> unit
Protected Overrides Sub OnClosing (e As CancelEventArgs)

参数

e
CancelEventArgs

提供可取消事件的数据。

注解

此方法与此类无关。

该方法 OnClosing 使预览失效,以便在重新打开对话框时重新生成预览。

引发事件会通过委托调用事件处理程序。 有关详细信息,请参阅 处理和引发事件

该方法 OnClosing 还允许派生类在不附加委托的情况下处理事件。 这是处理派生类中的事件的首选技术。

继承者说明

在派生类中重写 OnClosing(CancelEventArgs) 时,请务必调用基类 OnClosing(CancelEventArgs) 的方法,以便已注册的委托接收事件。

适用于