title: Make COM Interop Events visible from Interface
body: <p>I wrote my code like the example below:</p>
  
  <pre><code>public delegate void ClickDelegate(int x, int y);
  public delegate void PulseDelegate();
  
  [Guid("39D5B254-64DB-4130-9601-996D0B20D3E5"),
  InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)]
  [ComVisible(true)]
  public interface IButton
  {
    void Work();
  }
  
  // Step 1: Defines an event sink interface (ButtonEvents) to be     
  // implemented by the COM sink.
  [GuidAttribute("1A585C4D-3371-48dc-AF8A-AFFECC1B0967") ]
  [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
  public interface ButtonEvents
  {
      void Click(int x, int y);
      void Pulse();
  }
  
  // Step 2: Connects the event sink interface to a class 
  // by passing the namespace and event sink interface.
  // ("EventSource.ButtonEvents, EventSrc").
  [ComSourceInterfaces(typeof(ButtonEvents))]
  public class Button : IButton
  {
      public event ClickDelegate Click;
      public event PulseDelegate Pulse;
  
      public Button() { }
  
      public void CauseClickEvent(int x, int y) { Click(x, y); }
      public void CausePulse() { Pulse(); }
  
      public void Work() { /* Do some stuff */ }
  }
  </code></pre>
  
  <p>This works fine with VB. When I define it like:</p>
  
  <pre><code>Dim WithEvents obj As Button
  </code></pre>
  
  <p>But I want to define it with the Interface like:</p>
  
  <pre><code>Dim WithEvents obj As IButton
  </code></pre>
  
  <p>This is not working 'cause the events are not visible from the IButton interface.</p>
  
  <p><strong>Is there a way to do this?</strong></p>