Zdarzenie DocumentEventsClass.DocumentOpened
Ten interfejs API obsługuje infrastrukturę programu .NET Framework i nie jest przeznaczony do użycia bezpośrednio w kodzie.
Występuje po otwarciu dokumentu.
Przestrzeń nazw: EnvDTE
Zestaw: EnvDTE (w EnvDTE.dll)
Składnia
'Deklaracja
Public Overridable Event DocumentOpened As _dispDocumentEvents_DocumentOpenedEventHandler
public virtual event _dispDocumentEvents_DocumentOpenedEventHandler DocumentOpened
public:
virtual event _dispDocumentEvents_DocumentOpenedEventHandler^ DocumentOpened {
void add (_dispDocumentEvents_DocumentOpenedEventHandler^ value);
void remove (_dispDocumentEvents_DocumentOpenedEventHandler^ value);
}
abstract DocumentOpened : IEvent<_dispDocumentEvents_DocumentOpenedEventHandler,
EventArgs>
override DocumentOpened : IEvent<_dispDocumentEvents_DocumentOpenedEventHandler,
EventArgs>
Język JScript nie obsługuje zdarzeń.
Implementuje
_dispDocumentEvents_Event.DocumentOpened
Przykłady
Public Sub DocumentEvents_DocumentOpened(ByVal Document As _
EnvDTE.Document) Handles DocumentEvents.DocumentOpened
MsgBox("test")
End Sub
Zabezpieczenia programu .NET Framework
- Pełne zaufanie do bezpośredniego wywołującego. Tego elementu członkowskiego nie można używać w kodzie częściowo zaufanym. Aby uzyskać więcej informacji, zobacz Używanie bibliotek pochodzących z częściowo zaufanego kodu.