Results 1 to 3 of 3

Thread: [RESOLVED] Implements with events?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Resolved [RESOLVED] Implements with events?

    Hello,

    I wrote the interface that I want for a Class object in another Class.

    Then I have a declaration in the first Class:

    Code:
    Implements MyInterface
    And off course I wrote all the members for the interface.

    But now I need to also raise an event.

    How can I do that?

  2. #2
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,253

    Re: Implements with events?

    Quote Originally Posted by Eduardo- View Post
    Hello,

    I wrote the interface that I want for a Class object in another Class.

    Then I have a declaration in the first Class:

    Code:
    Implements MyInterface
    And off course I wrote all the members for the interface.

    But now I need to also raise an event.

    How can I do that?
    VBs Standard-Events will work only on the Default-(Main-)Interface of a given Class.
    The easiest way would be, to just enhance your secondary interface about a kind of "SubScribe"-method,
    which then receives a little CallBack-Object-instance (which itself also implements another interface - one you define for the Events you plan to raise).

    Olaf

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,064

    Re: Implements with events?

    Quote Originally Posted by Schmidt View Post
    VBs Standard-Events will work only on the Default-(Main-)Interface of a given Class.
    The easiest way would be, to just enhance your secondary interface about a kind of "SubScribe"-method,
    which then receives a little CallBack-Object-instance (which itself also implements another interface - one you define for the Events you plan to raise).

    Olaf
    Ok, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width