WithEvents applicationClass1 As ApplicationClass Function applicationClass1_DocumentBeforeClose(Doc As Document, _ Cancel As Boolean) As Void Handles applicationClass1.DocumentBeforeClose End Function
Public Overridable Event DocumentBeforeClose As ApplicationEvents4_DocumentBeforeCloseEventHandler
public virtual event ApplicationEvents4_DocumentBeforeCloseEventHandler DocumentBeforeClose;
public: event ApplicationEvents4_DocumentBeforeCloseEventHandler^ DocumentBeforeClose;
public void add_DocumentBeforeClose(ApplicationEvents4_DocumentBeforeCloseEventHandler handler); public void remove_DocumentBeforeClose(ApplicationEvents4_DocumentBeforeCloseEventHandler handler);
In JScript, you can handle the events defined by a class, but you cannot define your own.