共用方式為


DocumentEventsClass.DocumentClosing 事件

這個應用程式開發介面支援 .NET Framework 基礎結構,但您不可以直接在程式碼中使用它。

只在文件關閉之前發生。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
Public Overridable Event DocumentClosing As _dispDocumentEvents_DocumentClosingEventHandler
public virtual event _dispDocumentEvents_DocumentClosingEventHandler DocumentClosing
public:
virtual   event _dispDocumentEvents_DocumentClosingEventHandler^ DocumentClosing {
    void add (_dispDocumentEvents_DocumentClosingEventHandler^ value);
    void remove (_dispDocumentEvents_DocumentClosingEventHandler^ value);
}
abstract DocumentClosing : IEvent<_dispDocumentEvents_DocumentClosingEventHandler,
    EventArgs>
override DocumentClosing : IEvent<_dispDocumentEvents_DocumentClosingEventHandler,
    EventArgs>
JScript 不支援事件。

實作

_dispDocumentEvents_Event.DocumentClosing

範例

Public Sub DocumentEvents_DocumentClosing(ByVal Document As _
    EnvDTE.Document) Handles DocumentEvents.DocumentClosing
       MsgBox("test")
End Sub

.NET Framework 安全性

請參閱

參考

DocumentEventsClass 類別

EnvDTE 命名空間